From 935430c3e3441dd8ff8caa5cb969e3e5014dcd17 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 13 Mar 2022 07:52:00 +0000 Subject: [PATCH 01/73] fix preview output when no output param and type doesn't exist --- app/controllers/api/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 314e255845..90f6730142 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -951,7 +951,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */); if ($data) { - $output = (empty($output)) ? $type : $output; + $output = (empty($output)) ? ( empty($type) ? 'jpg' : $type ) : $output; return $response ->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg']) From 7d32f84cc25b5bd87a9629e537ff6f1139a4c9c0 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 13 Mar 2022 07:58:49 +0000 Subject: [PATCH 02/73] fix output type --- app/controllers/api/storage.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 90f6730142..f3fc2c3603 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -950,9 +950,8 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $cache = new Cache(new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId() . DIRECTORY_SEPARATOR . $bucketId . DIRECTORY_SEPARATOR . $fileId)); // Limit file number or size $data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */); + $output = (empty($output)) ? ( empty($type) ? 'jpg' : $type ) : $output; if ($data) { - $output = (empty($output)) ? ( empty($type) ? 'jpg' : $type ) : $output; - return $response ->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg']) ->addHeader('Expires', $date) @@ -1002,8 +1001,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $image->setRotation(($rotation + 360) % 360); } - $output = (empty($output)) ? $type : $output; - $data = $image->output($output, $quality); $cache->save($key, $data); From d1abd4832fc727e775c56401d5b6fb82aca2898c Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 13 Mar 2022 08:09:24 +0000 Subject: [PATCH 03/73] storage preview limit environment variable --- app/controllers/api/storage.php | 2 +- app/init.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index f3fc2c3603..80d3fb1efc 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -924,7 +924,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $cipher = $file->getAttribute('openSSLCipher'); $mime = $file->getAttribute('mimeType'); - if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > APP_LIMIT_PREVIEW) { + if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) App::getEnv('_APP_STORAGE_PREVIEW_LIMIT',20000000)) { if(!\in_array($mime, $inputs)) { $path = (\array_key_exists($mime, $fileLogos)) ? $fileLogos[$mime] : $fileLogos['default']; } else { diff --git a/app/init.php b/app/init.php index 40c2f569b9..ab18896bcb 100644 --- a/app/init.php +++ b/app/init.php @@ -69,7 +69,6 @@ const APP_LIMIT_USERS = 10000; const APP_LIMIT_ANTIVIRUS = 20000000; //20MB const APP_LIMIT_ENCRYPTION = 20000000; //20MB const APP_LIMIT_COMPRESSION = 20000000; //20MB -const APP_LIMIT_PREVIEW = 20000000; //20MB file size limit for preview endpoint const APP_CACHE_BUSTER = 302; const APP_VERSION_STABLE = '0.13.2'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; From 1835dba27faf7661d2b0cfe2b8c797e1e2c41dc8 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 13 Mar 2022 08:11:05 +0000 Subject: [PATCH 04/73] storage preview limit variable --- app/config/variables.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/config/variables.php b/app/config/variables.php index 5cae4aa564..a79bea7595 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -402,6 +402,15 @@ return [ 'question' => '', 'filter' => '' ], + [ + 'name' => '_APP_STORAGE_PREVIEW_LIMIT', + 'description' => 'Maximum file size allowed for file image preview. The default value is 20MB. You should pass your size limit value in bytes.', + 'introduction' => '0.14.0', + 'default' => '20000000', + 'required' => false, + 'question' => '', + 'filter' => '' + ], [ 'name' => '_APP_STORAGE_ANTIVIRUS', 'description' => 'This variable allows you to disable the internal anti-virus scans. This value is set to \'disabled\' by default, to enable the scans set the value to \'enabled\'. Before enabling, you must add the ClamAV service and depend on it on main Appwrite service.', From 46e106ab561e14b18bace3cf4460016e1a4da7ed Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 18 Mar 2022 11:07:54 +0000 Subject: [PATCH 05/73] fix content type logic --- app/controllers/api/storage.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 4b6b0c94e8..e38c043647 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -944,10 +944,16 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $cache = new Cache(new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId() . DIRECTORY_SEPARATOR . $bucketId . DIRECTORY_SEPARATOR . $fileId)); // Limit file number or size $data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */); - $output = (empty($output)) ? ( empty($type) ? 'jpg' : $type ) : $output; + + $contentType = in_array($mime, $outputs) ? $mime : $outputs['jpg']; + + if(!empty($output) && \array_key_exists($output, $outputs)) { + $contentType = $outputs[$output]; + } + if ($data) { return $response - ->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg']) + ->setContentType($contentType) ->addHeader('Expires', $date) ->addHeader('X-Appwrite-Cache', 'hit') ->send($data) From 2da677906bfd284e4ba525ec9b5bf71a0230706b Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 18 Mar 2022 11:18:53 +0000 Subject: [PATCH 06/73] final fixes --- app/controllers/api/storage.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index e38c043647..3bc09ea8be 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -947,13 +947,17 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $contentType = in_array($mime, $outputs) ? $mime : $outputs['jpg']; - if(!empty($output) && \array_key_exists($output, $outputs)) { - $contentType = $outputs[$output]; + if(empty($output)) { + if(empty($type)) { + $output = array_search($mime, $outputs) ?? 'jpg'; + } else { + $output = $type; + } } if ($data) { return $response - ->setContentType($contentType) + ->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg']) ->addHeader('Expires', $date) ->addHeader('X-Appwrite-Cache', 'hit') ->send($data) @@ -1011,7 +1015,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') ; $response - ->setContentType($outputs[$output]) + ->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg']) ->addHeader('Expires', $date) ->addHeader('X-Appwrite-Cache', 'miss') ->send($data) From 3a43ef95b1756b1e5ffa218bab985310f14e0dc8 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 18 Mar 2022 11:19:26 +0000 Subject: [PATCH 07/73] remove useless code --- app/controllers/api/storage.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 3bc09ea8be..fc3da05b4c 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -944,9 +944,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $cache = new Cache(new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId() . DIRECTORY_SEPARATOR . $bucketId . DIRECTORY_SEPARATOR . $fileId)); // Limit file number or size $data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */); - - $contentType = in_array($mime, $outputs) ? $mime : $outputs['jpg']; - if(empty($output)) { if(empty($type)) { $output = array_search($mime, $outputs) ?? 'jpg'; From 1bb49c37e0425f314b8a93b011a71cf7f07e8db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 18 Mar 2022 11:42:13 +0000 Subject: [PATCH 08/73] Improve build container cleanup --- app/executor.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/app/executor.php b/app/executor.php index 1fa32599ab..cd501c90d3 100644 --- a/app/executor.php +++ b/app/executor.php @@ -306,9 +306,24 @@ App::post('/v1/runtimes') Console::error('Build failed: ' . $th->getMessage() . $stdout); throw new Exception($th->getMessage() . $stdout, 500); } finally { - if (!empty($containerId) && $remove) { - $orchestration->remove($containerId, true); + // Container cleanup + if($remove) { + if (!empty($containerId)) { + // If container properly created + $orchestration->remove($containerId, true); + } else { + // If whole creation failed, but container might have been initialized + try { + // Try to remove with contaier name instead of ID + $orchestration->remove($runtimeId, true); + } catch (Throwable $th) { + // If fails, means initialization also failed. + // Contianer is not there, no need to remove + } + } } + + // Release orchestration back to pool, we are done with it $orchestrationPool->put($orchestration); } From e37da6a5f7612952757f83037576d5e86e6d9b17 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 18 Mar 2022 11:51:59 +0000 Subject: [PATCH 09/73] code refactor --- app/controllers/api/storage.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index fc3da05b4c..a5bda47aae 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -945,11 +945,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */); if(empty($output)) { - if(empty($type)) { - $output = array_search($mime, $outputs) ?? 'jpg'; - } else { - $output = $type; - } + $output = empty($type) ? (array_search($mime, $outputs) ?? 'jpg') : $type; } if ($data) { From 137ec1631baccbb6d94c0358e89a06e7f29468c5 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 19 Mar 2022 02:57:50 +0400 Subject: [PATCH 10/73] feat: added comment about rethrowing PDO exception --- app/controllers/general.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/general.php b/app/controllers/general.php index c08c244b31..ecf75e5d32 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -321,6 +321,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); $route = $utopia->match($request); + /** Rethrow PDO exceptions so the database connection can be returned to the pool correctly */ if ($error instanceof PDOException) { throw $error; } From 0feb4a1008968c6ccc170626c61cb4cc0462f113 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 19 Mar 2022 02:58:54 +0400 Subject: [PATCH 11/73] feat: added comment about rethrowing PDO exception --- app/controllers/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index ecf75e5d32..a65e07c81c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -321,7 +321,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); $route = $utopia->match($request); - /** Rethrow PDO exceptions so the database connection can be returned to the pool correctly */ + /** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */ if ($error instanceof PDOException) { throw $error; } From 68b19507511dc40bfe538f58d532472b8c0b395e Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 20 Mar 2022 08:20:52 +0545 Subject: [PATCH 12/73] Update app/controllers/api/storage.php Co-authored-by: Torsten Dittmann --- app/controllers/api/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index a5bda47aae..369fc4d3e1 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -918,7 +918,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $cipher = $file->getAttribute('openSSLCipher'); $mime = $file->getAttribute('mimeType'); - if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) App::getEnv('_APP_STORAGE_PREVIEW_LIMIT',20000000)) { + if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) App::getEnv('_APP_STORAGE_PREVIEW_LIMIT', 20000000)) { if(!\in_array($mime, $inputs)) { $path = (\array_key_exists($mime, $fileLogos)) ? $fileLogos[$mime] : $fileLogos['default']; } else { From ab3db2af1bd89de7b8f3250440ea29d2a58adec2 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 20 Mar 2022 08:33:40 +0545 Subject: [PATCH 13/73] add comment --- app/controllers/api/storage.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 369fc4d3e1..31c9a68ff5 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -945,6 +945,8 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') $data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */); if(empty($output)) { + // when file extension is not provided and the mime type is not one of our supported outputs + // we fallback to `jpg` output format $output = empty($type) ? (array_search($mime, $outputs) ?? 'jpg') : $type; } From b00b132238fcfa20e4f0335d0814bf9c39b46bf1 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 20 Mar 2022 06:31:34 +0000 Subject: [PATCH 14/73] fix missing auth skip while getting bucket --- app/controllers/api/storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 5e78356c59..ba2f76f172 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -376,7 +376,7 @@ App::post('/v1/storage/buckets/:bucketId/files') /** @var Utopia\Storage\Device $deviceLocal */ /** @var string $mode */ - $bucket = $dbForProject->getDocument('buckets', $bucketId); + $bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId)); if ($bucket->isEmpty() || (!$bucket->getAttribute('enabled') && $mode !== APP_MODE_ADMIN)) { From f0173fc0b6d93dadcf6d6fb08623fc8c76976762 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 20 Mar 2022 18:50:36 +0200 Subject: [PATCH 15/73] Updated diagrams --- docs/specs/overview.drawio.svg | 635 +++++++++++++++++++-------------- 1 file changed, 372 insertions(+), 263 deletions(-) diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index e79d96c822..867591fffe 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -1,15 +1,15 @@ - + - - + + - +
-
-
+
+
Web
@@ -20,15 +20,15 @@ - - + + - +
-
-
+
+
Flutter
@@ -44,10 +44,10 @@ - +
-
-
+
+
iOS
@@ -58,15 +58,15 @@ - - + + - +
-
-
+
+
Android
@@ -77,15 +77,15 @@ - - + + - +
-
-
+
+
Servers
@@ -96,40 +96,42 @@ - - - + + + - +
-
-
+
+
Appwrite
- + Appwrite - - - - - - - - + + + + + + + + + + - +
-
-
+
+
Loadbalancer
@@ -140,56 +142,39 @@ - - - - -
-
-
- Console -
-
-
-
- - Console - -
-
- + - + - + - + - + - + - + - - - - - + + + + + - + - +
-
-
+
+
REST API
- + REST API @@ -197,54 +182,62 @@ - +
-
-
- Queue (Redis) +
+
+ Queue +
+ + (Redis) +
- Queue (Redis) + Queue... - - - - + + + + - +
-
-
- Cache (Redis) +
+
+ Cache +
+ + (Redis) +
- Cache (Redis) + Cache... - + - -
-
-
+ +
+
+
Database
- + Database @@ -252,10 +245,10 @@ - +
-
-
+
+
Users
@@ -269,10 +262,10 @@ - +
-
-
+
+
Account
@@ -286,10 +279,10 @@ - +
-
-
+
+
Teams
@@ -303,10 +296,10 @@ - +
-
-
+
+
Database
@@ -320,10 +313,10 @@ - +
-
-
+
+
Storage
@@ -337,10 +330,10 @@ - +
-
-
+
+
Localization
@@ -354,10 +347,10 @@ - +
-
-
+
+
Avatars
@@ -371,10 +364,10 @@ - +
-
-
+
+
Health
@@ -388,10 +381,10 @@ - +
-
-
+
+
SSL Gateway
@@ -402,38 +395,41 @@ - - - + + + - -
-
-
+ +
+
+
Maintenance
- + Maintenance - - - - - - + + + + + + + + + - +
-
-
+
+
Security Layer
@@ -444,38 +440,38 @@ - - - - - + + + + + - -
-
-
+ +
+
+
Usage
- + Usage - - - - + + + + - +
-
-
+
+
Audits
@@ -486,17 +482,17 @@ - - - - + + + + - +
-
-
+
+
Mails
@@ -507,34 +503,34 @@ - + - -
-
-
+ +
+
+
SMTP
- + SMTP - - - - + + + + - +
-
-
+
+
Database
@@ -545,17 +541,17 @@ - - - - + + + + - +
-
-
+
+
Webhooks
@@ -566,19 +562,20 @@ - - - - - - + + + + + + + - +
-
-
+
+
Functions
@@ -589,70 +586,61 @@ - + - -
-
-
- Docker + +
+
+
+ StatsD +
+ + (Telegraf) +
- - Docker + + StatsD... - + - -
-
-
- StatsD (Telegraf) + +
+
+
+ TimeSeries +
+ + (InfluxDB) +
- - StatsD (Telegraf) + + TimeSeries... - - - - -
-
-
- TimeSeries (InfluxDB) -
-
-
-
- - TimeSeries (InfluxDB) - -
-
- - - - - - + + + + + + - +
-
-
+
+
Certs
@@ -663,15 +651,15 @@ - - + + - +
-
-
+
+
Deletes
@@ -682,21 +670,21 @@ - + - + - -
-
-
+ +
+
+
Letsencrypt
- + Letsencrypt @@ -704,56 +692,177 @@ - +
-
-
- AntiVirus (ClamAV) +
+
+ AntiVirus +
+ + (ClamAV) +
- AntiVirus (ClamAV) + AntiVirus... - + + + - +
-
-
+
+
REALTIME API
- + REALTIME API - + - -
-
-
+ +
+
+
Scheduler
- + Scheduler + + + + +
+
+
+ Builds +
+
+
+
+ + Builds + +
+
+ + + + + + + +
+
+
+ Executor +
+ + (Open-Runtimes) + +
+
+
+
+ + Executor... + +
+
+ + + + +
+
+
+ Docker / K8S +
+
+
+
+ + Docker / K8S + +
+
+ + + + +
+
+
+ Console +
+
+
+
+ + Console + +
+
+ + + + +
+
+
+ Functions +
+
+
+
+ + Functions + +
+
+ + + + + + +
+
+
+ GraphQL API +
+ + (Coming Soon) + +
+
+
+
+ + GraphQL API... + +
+
From 2ef8dd48fb2f24b3c63aac2e5155a3d9e5924cff Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 20 Mar 2022 18:50:41 +0200 Subject: [PATCH 16/73] Updated diagrams --- docs/specs/authentication.drawio.svg | 605 +++++++++++++-------------- docs/specs/functions.drawio.svg | 1 - 2 files changed, 293 insertions(+), 313 deletions(-) delete mode 100644 docs/specs/functions.drawio.svg diff --git a/docs/specs/authentication.drawio.svg b/docs/specs/authentication.drawio.svg index 0a34125ad0..f8f88baa71 100644 --- a/docs/specs/authentication.drawio.svg +++ b/docs/specs/authentication.drawio.svg @@ -1,221 +1,221 @@ - + - - - + + + - -
-
-
+ +
+
+
Secure Cookie
- + Secure Cookie - - - + + + - -
-
-
+ +
+
+
Email / Password
- + Email / Password - - - + + + - -
-
-
+ +
+
+
OAuth Provider
- + OAuth Provider - - - + + + - -
-
-
+ +
+
+
Member
- + Member - - - + + + - -
-
-
+ +
+
+
App
- + App - - - + + + - -
-
-
+ +
+
+
JWT
- + JWT - - - + + + - -
-
-
+ +
+
+
AP Key
- + AP Key - - + + - -
-
-
+ +
+
+
Granted with
- + Granted with - + - -
-
-
+ +
+
+
Guest
- + Guest - - - + + + - -
-
-
+ +
+
+
Public Scopes
- + Public Scopes - - - + + + - -
-
-
+ +
+
+
Member Scopes
- + Member Scopes - - - + + + - -
-
-
+ +
+
+
Custom Scopes
@@ -225,41 +225,41 @@
- + Custom Scopes... - + - -
-
-
+ +
+
+
Scope Validation
- + Scope Validation - - - - - - - + + + + + + + - -
-
-
+ +
+
+
Database
@@ -269,56 +269,56 @@
- + Database... - + - -
-
-
+ +
+
+
Roles Validation
- + Roles Validation - - - + + + - -
-
-
+ +
+
+
Roles
- + Roles - - - + + + - -
-
-
+ +
+
+
Wildcard
* @@ -326,20 +326,20 @@
- + Wildcard... - - - + + + - -
-
-
+ +
+
+
Guset
role:guest @@ -347,20 +347,20 @@
- + Guset... - - - + + + - -
-
-
+ +
+
+
Member
role:member @@ -368,20 +368,20 @@
- + Member... - - - + + + - -
-
-
+ +
+
+
App
role:app @@ -389,18 +389,18 @@
- + App... - + - -
-
-
+ +
+
+
User ID
user:[ID] @@ -408,20 +408,20 @@
- + User ID... - - - + + + - -
-
-
+ +
+
+
Team ID
team:[ID] @@ -429,20 +429,20 @@
- + Team ID... - - - + + + - -
-
-
+ +
+
+
Team ID + Role
team:[ID]/[ROLE] @@ -450,18 +450,18 @@
- + Team ID + Role... - + - -
-
-
+ +
+
+
Member ID
member:[ID] @@ -469,18 +469,18 @@
- + Member ID... - + - -
-
-
+ +
+
+
Endpoints
@@ -490,111 +490,111 @@
- + Endpoints... - - - + + + - -
-
-
+ +
+
+
Scopes
- + Scopes - - - + + + - -
-
-
+ +
+
+
public
- + public - - - + + + - -
-
-
+ +
+
+
account
- + account - - - + + + - -
-
-
+ +
+
+
files.read
- + files.read - + - -
-
-
+ +
+
+
files.write
- + files.write - + - -
-
-
+ +
+
+
... @@ -602,20 +602,20 @@
- + ... - - - + + + - -
-
-
+ +
+
+
Guest Role
(only) @@ -623,53 +623,53 @@
- + Guest Role... - + - -
-
-
+ +
+
+
Member / User / Team Roles
- + Member / User / Team... - - + + - -
-
-
+ +
+
+
Granted with
- + Granted with - + - -
-
-
+ +
+
+
No Role Base
Authentication @@ -677,57 +677,57 @@
- + No Role Base... - - + + - -
-
-
+ +
+
+
Granted with
- + Granted with - - - + + + - -
-
-
+ +
+
+
Team Invite
- + Team Invite - - - + + + - -
-
-
+ +
+
+
HTTP Header
X-Appwrite-Key @@ -735,18 +735,18 @@
- + HTTP Header... - + - -
-
-
+ +
+
+
HTTP Header
X-Appwrite-JWT @@ -754,34 +754,15 @@
- + HTTP Header... - - - - -
-
-
- - Not Released Yet - -
-
-
-
- - Not Released Yet - -
-
- + Viewer does not support full SVG 1.1 diff --git a/docs/specs/functions.drawio.svg b/docs/specs/functions.drawio.svg deleted file mode 100644 index a5f50b743f..0000000000 --- a/docs/specs/functions.drawio.svg +++ /dev/null @@ -1 +0,0 @@ -
Console
Console
Code Packger
(CLI Tool?)
Code Packger...
Web IDE
(Based on PRISM?)
Web IDE...
Database
Database
Functions
Functions
PHP
PHP
Node.js
Node.js
appwrite
appwrite
    appwrite.demoapp.com/v1    
    appwrite.demoapp.com/v1    
demoapp.com
demoapp.com

Cloud Functions

Specification for adding, executing and managing custom, user supplied cloud functions.

Cloud Functions...
Python
Python
Ruby
Ruby
Versions / Tags
Versions / Tags
Encrypted Code
(Storage)
Encrypted Code...
Execution
Execution
Worker
Worker
Warmup / Pull
(All Docker Images)
Warmup / Pull...
Execute Code
(Limit Execution Time)
Execute Code...
Log Result
Log Result
Viewer does not support full SVG 1.1
\ No newline at end of file From 59b3928a665702aba9168e8d3767e4c791c37673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 21 Mar 2022 08:30:56 +0100 Subject: [PATCH 17/73] Fix GH issue url --- app/views/console/comps/footer.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/console/comps/footer.phtml b/app/views/console/comps/footer.phtml index 3281849316..c7efa999b2 100644 --- a/app/views/console/comps/footer.phtml +++ b/app/views/console/comps/footer.phtml @@ -26,7 +26,7 @@ $version = $this->getParam('version', '') . '.' . APP_CACHE_BUSTER; data-analytics-event="click" data-analytics-category="console/footer" data-analytics-label="New GitHub Issue" - href="https://github.com/appwrite/appwrite/issues/new?body=%0A%0A%0A---%0AAppwrite Version:%20" target="_blank" rel="noopener">Open an Issue
+ href="https://github.com/appwrite/appwrite/issues/new/choose" target="_blank" rel="noopener">Open an Issue
  • Date: Mon, 21 Mar 2022 14:30:51 +0000 Subject: [PATCH 18/73] Fixed validation regex for custom ID --- app/views/console/comps/header.phtml | 2 +- app/views/console/database/collection.phtml | 18 ++++++------- app/views/console/database/document.phtml | 2 +- app/views/console/database/index.phtml | 2 +- app/views/console/functions/index.phtml | 2 +- app/views/console/storage/index.phtml | 2 +- app/views/console/users/index.phtml | 4 +-- composer.lock | 28 ++++++++++----------- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/views/console/comps/header.phtml b/app/views/console/comps/header.phtml index e6478225ff..59c701d4e0 100644 --- a/app/views/console/comps/header.phtml +++ b/app/views/console/comps/header.phtml @@ -211,7 +211,7 @@ required maxlength="36" class="" - pattern="^[a-zA-Z0-9][a-zA-Z0-9_.-]{1,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" name="projectId" /> diff --git a/app/views/console/database/collection.phtml b/app/views/console/database/collection.phtml index 53921ac571..aa39d45eb3 100644 --- a/app/views/console/database/collection.phtml +++ b/app/views/console/database/collection.phtml @@ -627,7 +627,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -683,7 +683,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -748,7 +748,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -813,7 +813,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -866,7 +866,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -923,7 +923,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -976,7 +976,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -1029,7 +1029,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -1107,7 +1107,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    diff --git a/app/views/console/database/document.phtml b/app/views/console/database/document.phtml index faa198aa4b..2b71c6673c 100644 --- a/app/views/console/database/document.phtml +++ b/app/views/console/database/document.phtml @@ -83,7 +83,7 @@ $logs = $this->getParam('logs', null); name="documentId" id="documentId" maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" /> + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" />
    diff --git a/app/views/console/database/index.phtml b/app/views/console/database/index.phtml index 341c3c598e..f12cf9dc6a 100644 --- a/app/views/console/database/index.phtml +++ b/app/views/console/database/index.phtml @@ -102,7 +102,7 @@ data-validator="database.getCollection" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" name="collectionId" /> diff --git a/app/views/console/functions/index.phtml b/app/views/console/functions/index.phtml index 445112df8f..b11bbdf15b 100644 --- a/app/views/console/functions/index.phtml +++ b/app/views/console/functions/index.phtml @@ -113,7 +113,7 @@ $runtimes = $this->getParam('runtimes', []); data-validator="functions.get" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" name="functionId" /> diff --git a/app/views/console/storage/index.phtml b/app/views/console/storage/index.phtml index 69ae9ad7d3..6ed933eabf 100644 --- a/app/views/console/storage/index.phtml +++ b/app/views/console/storage/index.phtml @@ -101,7 +101,7 @@ data-validator="storage.getBucket" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" name="bucketId" id="bucketId" /> diff --git a/app/views/console/users/index.phtml b/app/views/console/users/index.phtml index 10baf74412..470092f0f9 100644 --- a/app/views/console/users/index.phtml +++ b/app/views/console/users/index.phtml @@ -165,7 +165,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false); data-validator="users.get" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" id="userId" name="userId" /> @@ -313,7 +313,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false); data-validator="teams.get" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{1,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" id="teamId" name="teamId" /> diff --git a/composer.lock b/composer.lock index 291b391b3e..4a9b786b33 100644 --- a/composer.lock +++ b/composer.lock @@ -478,16 +478,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.1", + "version": "7.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", "shasum": "" }, "require": { @@ -582,7 +582,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.1" + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" }, "funding": [ { @@ -598,7 +598,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T18:43:05+00:00" + "time": "2022-03-20T14:16:28+00:00" }, { "name": "guzzlehttp/promises", @@ -686,16 +686,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.1.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", "shasum": "" }, "require": { @@ -719,7 +719,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -781,7 +781,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.1.0" + "source": "https://github.com/guzzle/psr7/tree/2.2.1" }, "funding": [ { @@ -797,7 +797,7 @@ "type": "tidelift" } ], - "time": "2021-10-06T17:43:30+00:00" + "time": "2022-03-20T21:55:58+00:00" }, { "name": "influxdb/influxdb-php", @@ -6580,5 +6580,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.2.0" } From 28779232d1f442c872fea678b6366531b7d9a2cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 22 Mar 2022 08:39:47 +0000 Subject: [PATCH 19/73] Fix env vars config --- app/config/variables.php | 80 ++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/app/config/variables.php b/app/config/variables.php index 918aa24a3a..b4cc23ce8a 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -643,47 +643,47 @@ return [ 'filter' => '' ], ], - [ - 'category' => 'Maintenance', - 'description' => '', - 'variables' => [ - [ - 'name' => '_APP_MAINTENANCE_INTERVAL', - 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', - 'introduction' => '0.7.0', - 'default' => '86400', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_MAINTENANCE_RETENTION_EXECUTION', - 'description' => 'The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days).', - 'introduction' => '0.7.0', - 'default' => '1209600', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_MAINTENANCE_RETENTION_AUDIT', - 'description' => 'IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days).', - 'introduction' => '0.7.0', - 'default' => '1209600', - 'required' => false, - 'question' => '', - 'filter' => '' - ], - [ - 'name' => '_APP_MAINTENANCE_RETENTION_ABUSE', - 'description' => 'The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day).', - 'introduction' => '0.7.0', - 'default' => '86400', - 'required' => false, - 'question' => '', - 'filter' => '' - ] + ], + [ + 'category' => 'Maintenance', + 'description' => '', + 'variables' => [ + [ + 'name' => '_APP_MAINTENANCE_INTERVAL', + 'description' => 'Interval value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 86400 seconds (1 day).', + 'introduction' => '0.7.0', + 'default' => '86400', + 'required' => false, + 'question' => '', + 'filter' => '' ], + [ + 'name' => '_APP_MAINTENANCE_RETENTION_EXECUTION', + 'description' => 'The maximum duration (in seconds) upto which to retain execution logs. The default value is 1209600 seconds (14 days).', + 'introduction' => '0.7.0', + 'default' => '1209600', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_MAINTENANCE_RETENTION_AUDIT', + 'description' => 'IThe maximum duration (in seconds) upto which to retain audit logs. The default value is 1209600 seconds (14 days).', + 'introduction' => '0.7.0', + 'default' => '1209600', + 'required' => false, + 'question' => '', + 'filter' => '' + ], + [ + 'name' => '_APP_MAINTENANCE_RETENTION_ABUSE', + 'description' => 'The maximum duration (in seconds) upto which to retain abuse logs. The default value is 86400 seconds (1 day).', + 'introduction' => '0.7.0', + 'default' => '86400', + 'required' => false, + 'question' => '', + 'filter' => '' + ] ], ], ]; From 5b73ab3635a20eeff23f908f30d1556dbdfd231a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 22 Mar 2022 08:53:56 +0000 Subject: [PATCH 20/73] Updated GH issue url --- app/views/console/comps/footer.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/console/comps/footer.phtml b/app/views/console/comps/footer.phtml index c7efa999b2..5b88da0c3a 100644 --- a/app/views/console/comps/footer.phtml +++ b/app/views/console/comps/footer.phtml @@ -26,7 +26,7 @@ $version = $this->getParam('version', '') . '.' . APP_CACHE_BUSTER; data-analytics-event="click" data-analytics-category="console/footer" data-analytics-label="New GitHub Issue" - href="https://github.com/appwrite/appwrite/issues/new/choose" target="_blank" rel="noopener">Open an Issue + href="https://github.com/appwrite/appwrite/issues/new?assignees=&labels=bug&template=bug.yaml&title=[]%20%F0%9F%90%9B+Bug+Report%3A+" target="_blank" rel="noopener">Open an Issue
  • Date: Tue, 22 Mar 2022 12:39:01 +0200 Subject: [PATCH 21/73] Review fixes --- docs/specs/overview.drawio.svg | 144 ++++++++++++++++----------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index 867591fffe..1b7a33e372 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -1,8 +1,8 @@ - + - - + + @@ -20,8 +20,8 @@ - - + + @@ -58,8 +58,8 @@ - - + + @@ -77,8 +77,8 @@ - - + + @@ -117,14 +117,14 @@ - - - - - - - - + + + + + + + + @@ -142,25 +142,23 @@ - + - + - + - + - + - + - + - - - - - + + + @@ -202,8 +200,8 @@ - - + + @@ -395,7 +393,7 @@ - + @@ -414,15 +412,15 @@ - - - - - - - - - + + + + + + + + + @@ -440,10 +438,12 @@ - - + + + + @@ -461,10 +461,10 @@ - + - - + + @@ -484,8 +484,8 @@ - - + + @@ -520,10 +520,10 @@ - + - - + + @@ -541,10 +541,10 @@ - + - - + + @@ -562,11 +562,11 @@ - + - - - + + + @@ -630,10 +630,10 @@ - + - - + + @@ -651,8 +651,8 @@ - - + + @@ -670,7 +670,7 @@ - + @@ -712,7 +712,7 @@ - + @@ -721,13 +721,13 @@
    - REALTIME API + Realtime API
    - REALTIME API + Realtime API @@ -765,9 +765,9 @@ - - - + + + @@ -840,8 +840,8 @@ - - + + From db56ca965e4dc97134489102d0a2bb8dec5066ee Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 22 Mar 2022 12:40:10 +0200 Subject: [PATCH 22/73] Review fixes --- docs/specs/overview.drawio.svg | 106 +++++++++++++++++---------------- 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index 1b7a33e372..b2d1003973 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -1,7 +1,7 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -117,13 +117,13 @@ - + - + - + - + @@ -142,24 +142,24 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + @@ -200,7 +200,7 @@ - + @@ -393,7 +393,7 @@ - + @@ -412,13 +412,13 @@ - + - + - + @@ -438,11 +438,11 @@ - + - + @@ -461,9 +461,9 @@ - + - + @@ -484,7 +484,7 @@ - + @@ -520,9 +520,9 @@ - + - + @@ -541,9 +541,9 @@ - + - + @@ -562,13 +562,13 @@ - + - + - + - + @@ -586,6 +586,8 @@ + + @@ -630,9 +632,9 @@ - + - + @@ -651,7 +653,7 @@ - + @@ -670,7 +672,7 @@ - + @@ -712,8 +714,8 @@ - - + + @@ -765,7 +767,7 @@ - + @@ -840,7 +842,7 @@ - + From df60aae1aa35bad285b6fcb863f4d2a325e71b27 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 22 Mar 2022 12:48:01 +0200 Subject: [PATCH 23/73] Minor architecture fixes --- docs/specs/overview.drawio.svg | 91 ++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index b2d1003973..5fc685cd4e 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -1,7 +1,7 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -142,24 +142,24 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + @@ -393,7 +393,7 @@ - + @@ -438,11 +438,11 @@ - + - + @@ -461,9 +461,9 @@ - + - + @@ -484,7 +484,7 @@ - + @@ -520,9 +520,9 @@ - + - + @@ -541,9 +541,9 @@ - + - + @@ -562,13 +562,13 @@ - + - + - + - + @@ -632,9 +632,9 @@ - + - + @@ -653,7 +653,7 @@ - + @@ -672,7 +672,7 @@ - + @@ -714,8 +714,8 @@ - - + + @@ -767,9 +767,12 @@ - + + + + @@ -842,7 +845,7 @@ - + From a3bb9f23182f5d6da60e3cc8e3d8151ac5c07425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 22 Mar 2022 12:31:52 +0000 Subject: [PATCH 24/73] Fix regex --- app/views/console/comps/header.phtml | 2 +- app/views/console/database/collection.phtml | 18 +++++++++--------- app/views/console/database/document.phtml | 2 +- app/views/console/database/index.phtml | 2 +- app/views/console/functions/index.phtml | 2 +- app/views/console/storage/index.phtml | 2 +- app/views/console/users/index.phtml | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/views/console/comps/header.phtml b/app/views/console/comps/header.phtml index 59c701d4e0..9f465f69d9 100644 --- a/app/views/console/comps/header.phtml +++ b/app/views/console/comps/header.phtml @@ -211,7 +211,7 @@ required maxlength="36" class="" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" name="projectId" /> diff --git a/app/views/console/database/collection.phtml b/app/views/console/database/collection.phtml index aa39d45eb3..1bdef71d18 100644 --- a/app/views/console/database/collection.phtml +++ b/app/views/console/database/collection.phtml @@ -627,7 +627,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -683,7 +683,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -748,7 +748,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -813,7 +813,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -866,7 +866,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -923,7 +923,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -976,7 +976,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -1029,7 +1029,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    @@ -1107,7 +1107,7 @@ $logs = $this->getParam('logs', null); - +
    Allowed Characters A-Z, a-z, 0-9, and non-leading underscore, hyphen and dot
    diff --git a/app/views/console/database/document.phtml b/app/views/console/database/document.phtml index 2b71c6673c..e048fad7b9 100644 --- a/app/views/console/database/document.phtml +++ b/app/views/console/database/document.phtml @@ -83,7 +83,7 @@ $logs = $this->getParam('logs', null); name="documentId" id="documentId" maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" /> + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" />
    diff --git a/app/views/console/database/index.phtml b/app/views/console/database/index.phtml index f12cf9dc6a..1da779c189 100644 --- a/app/views/console/database/index.phtml +++ b/app/views/console/database/index.phtml @@ -102,7 +102,7 @@ data-validator="database.getCollection" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" name="collectionId" /> diff --git a/app/views/console/functions/index.phtml b/app/views/console/functions/index.phtml index b11bbdf15b..fb254a5aa1 100644 --- a/app/views/console/functions/index.phtml +++ b/app/views/console/functions/index.phtml @@ -113,7 +113,7 @@ $runtimes = $this->getParam('runtimes', []); data-validator="functions.get" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" name="functionId" /> diff --git a/app/views/console/storage/index.phtml b/app/views/console/storage/index.phtml index 6ed933eabf..f716c76ddb 100644 --- a/app/views/console/storage/index.phtml +++ b/app/views/console/storage/index.phtml @@ -101,7 +101,7 @@ data-validator="storage.getBucket" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" name="bucketId" id="bucketId" /> diff --git a/app/views/console/users/index.phtml b/app/views/console/users/index.phtml index 470092f0f9..777c3a5cc5 100644 --- a/app/views/console/users/index.phtml +++ b/app/views/console/users/index.phtml @@ -165,7 +165,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false); data-validator="users.get" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" id="userId" name="userId" /> @@ -313,7 +313,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false); data-validator="teams.get" required maxlength="36" - pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,36}$" + pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]{0,35}$" id="teamId" name="teamId" /> From bd2d744db3c50074498639a1d52ac7c114d50c18 Mon Sep 17 00:00:00 2001 From: Wen Yu Ge Date: Tue, 22 Mar 2022 16:05:48 -0400 Subject: [PATCH 25/73] fix chinese brackets which are different --- README-CN.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README-CN.md b/README-CN.md index 7c11852d37..2439cd881f 100644 --- a/README-CN.md +++ b/README-CN.md @@ -20,7 +20,7 @@ Appwrite是一个基于Docker的端到端开发者平台,其容器化的微服务库可应用于网页端,移动端,以及后端。Appwrite 通过视觉化界面极简了从零编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。 -Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存, 图像处理,云函数计算,[等多种服务](https:/ /appwrite.io/docs)。 +Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存, 图像处理,云函数计算,[等多种服务](https://appwrite.io/docs). ![Appwrite](public/images/github.png) @@ -34,13 +34,13 @@ Appwrite 可以提供给开发者用户验证,外部授权,用户数据读 - [CMD](#cmd) - [PowerShell](#powershell) - [从旧版本升级](#从旧版本升级) -- [快速入门](#入门) +- [入门](#入门) - [软件服务](#软件服务) - [开发套件](#开发套件) - [客户端](#客户端) - [服务器](#服务器) - [开发者社区](#开发者社区) -- [软件架构]](#软件架构) +- [软件架构](#软件架构) - [贡献代码](#贡献代码) - [安全](#安全) - [订阅我们](#订阅我们) @@ -118,7 +118,7 @@ docker run -it --rm , ### 开发套件 -以下是当前支持的平台和语言列表。如果您想帮助我们为您选择的平台添加支持,您可以访问我们的 [SDK 生成器](https://github.com/appwrite/sdk-generator) 项目并查看我们的 [贡献指南]( https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md)。 +以下是当前支持的平台和语言列表。如果您想帮助我们为您选择的平台添加支持,您可以访问我们的 [SDK 生成器](https://github.com/appwrite/sdk-generator) 项目并查看我们的 [贡献指南](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md)。 #### 客户端 * ✅   [Web](https://github.com/appwrite/sdk-for-web) (由 Appwrite 团队维护) From da2d72b30af788a3486c74c31d65e46db7c4f861 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 22 Mar 2022 22:37:52 -0400 Subject: [PATCH 26/73] Update php base image to 8.0.17 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 023e88a205..5fc24cc0af 100755 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ COPY public /usr/local/src/public RUN npm ci RUN npm run build -FROM php:8.0.14-cli-alpine3.15 as compile +FROM php:8.0.17-cli-alpine3.15 as compile ARG DEBUG=false ENV DEBUG=$DEBUG @@ -123,7 +123,7 @@ RUN \ ./configure && \ make && make install -FROM php:8.0.14-cli-alpine3.15 as final +FROM php:8.0.17-cli-alpine3.15 as final LABEL maintainer="team@appwrite.io" From bff9acb88a0a2e7e638f094ffcf61c606450281c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 23 Mar 2022 12:05:57 +0000 Subject: [PATCH 27/73] Upgraded versions --- CHANGES.md | 5 +++++ README-CN.md | 6 +++--- README.md | 6 +++--- app/init.php | 4 ++-- src/Appwrite/Migration/Migration.php | 1 + 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2ac2f910bc..628e1ae031 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +# Version 0.13.4 + +## Bugs + + # Version 0.13.3 ## Bugs - Fixed search for terms that inlcude `@` characters diff --git a/README-CN.md b/README-CN.md index 7c11852d37..7952376e58 100644 --- a/README-CN.md +++ b/README-CN.md @@ -59,7 +59,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:0.13.3 + appwrite/appwrite:0.13.4 ``` ### Windows @@ -71,7 +71,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:0.13.3 + appwrite/appwrite:0.13.4 ``` #### PowerShell @@ -81,7 +81,7 @@ docker run -it --rm , --volume /var/run/docker.sock:/var/run/docker.sock , --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw , --entrypoint="install" , - appwrite/appwrite:0.13.3 + appwrite/appwrite:0.13.4 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index b3fd3d83cd..eb7c3ec022 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:0.13.3 + appwrite/appwrite:0.13.4 ``` ### Windows @@ -74,7 +74,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:0.13.3 + appwrite/appwrite:0.13.4 ``` #### PowerShell @@ -84,7 +84,7 @@ docker run -it --rm , --volume /var/run/docker.sock:/var/run/docker.sock , --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw , --entrypoint="install" , - appwrite/appwrite:0.13.3 + appwrite/appwrite:0.13.4 ``` Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after installation completes. diff --git a/app/init.php b/app/init.php index 7ed0152b24..fd509297f6 100644 --- a/app/init.php +++ b/app/init.php @@ -69,8 +69,8 @@ const APP_LIMIT_USERS = 10000; const APP_LIMIT_ANTIVIRUS = 20000000; //20MB const APP_LIMIT_ENCRYPTION = 20000000; //20MB const APP_LIMIT_COMPRESSION = 20000000; //20MB -const APP_CACHE_BUSTER = 303; -const APP_VERSION_STABLE = '0.13.3'; +const APP_CACHE_BUSTER = 304; +const APP_VERSION_STABLE = '0.13.4'; const APP_DATABASE_ATTRIBUTE_EMAIL = 'email'; const APP_DATABASE_ATTRIBUTE_ENUM = 'enum'; const APP_DATABASE_ATTRIBUTE_IP = 'ip'; diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 6f5f7a990b..723f210b81 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -39,6 +39,7 @@ abstract class Migration '0.13.1' => 'V12', '0.13.2' => 'V12', '0.13.3' => 'V12', + '0.13.4' => 'V12', ]; /** From b8db3f54aa9d8d327b0d2f995b1e9e0cff8b43f4 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 23 Mar 2022 17:13:00 +0100 Subject: [PATCH 28/73] Update CHANGES.md --- CHANGES.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 628e1ae031..7f4c3496d2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,16 @@ # Version 0.13.4 -## Bugs +## Features +- Added `detailedTrace` to Logger events +## Bugs +- Fixed missing volume mount in Docker Compose +- Fixed upload with Bucket File permission +- Fixed custom ID validation in Console +- Fixed file preview with no `output` passed +- Fixed GitHub issue URL in Console +- Fixed double PDOException logging +- Fixed functions cleanup when container is already initialized # Version 0.13.3 ## Bugs From 6f0af6a9d95674dd9c29cebbe86015585ce74d43 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 23 Mar 2022 17:16:54 +0100 Subject: [PATCH 29/73] Update CHANGES.md --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 7f4c3496d2..10034c4953 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## Features - Added `detailedTrace` to Logger events +- Added new `_APP_STORAGE_PREVIEW_LIMIT` environment variable to configure maximum preview file size ## Bugs - Fixed missing volume mount in Docker Compose @@ -11,6 +12,7 @@ - Fixed GitHub issue URL in Console - Fixed double PDOException logging - Fixed functions cleanup when container is already initialized +- Fixed float input precision in Console # Version 0.13.3 ## Bugs From 6360d244955eb69f813b62ab5e4c9bba64b08169 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 23 Mar 2022 17:17:36 +0100 Subject: [PATCH 30/73] Update variables.php --- app/config/variables.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/variables.php b/app/config/variables.php index ef4844cce8..c741cb5486 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -405,7 +405,7 @@ return [ [ 'name' => '_APP_STORAGE_PREVIEW_LIMIT', 'description' => 'Maximum file size allowed for file image preview. The default value is 20MB. You should pass your size limit value in bytes.', - 'introduction' => '0.14.0', + 'introduction' => '0.13.4', 'default' => '20000000', 'required' => false, 'question' => '', From 9cd6bbf50bb7047ecfe7fd938ddfb2e40614ae1a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 24 Mar 2022 07:20:34 +0000 Subject: [PATCH 31/73] added logging --- app/views/install/compose.phtml | 90 +++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 5740c8680d..0780e51289 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -36,6 +36,11 @@ services: appwrite: image: /: container_name: appwrite + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped networks: - appwrite @@ -132,6 +137,11 @@ services: image: /: entrypoint: realtime container_name: appwrite-realtime + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped labels: - "traefik.enable=true" @@ -172,6 +182,11 @@ services: appwrite-worker-audits: image: /: entrypoint: worker-audits + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-audits restart: unless-stopped networks: @@ -197,6 +212,11 @@ services: appwrite-worker-webhooks: image: /: entrypoint: worker-webhooks + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-webhooks restart: unless-stopped networks: @@ -218,6 +238,11 @@ services: appwrite-worker-deletes: image: /: entrypoint: worker-deletes + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-deletes restart: unless-stopped networks: @@ -259,6 +284,11 @@ services: appwrite-worker-database: image: /: entrypoint: worker-database + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-database restart: unless-stopped networks: @@ -284,6 +314,11 @@ services: appwrite-worker-builds: image: /: entrypoint: worker-builds + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-builds restart: unless-stopped networks: @@ -310,6 +345,11 @@ services: appwrite-worker-certificates: image: /: entrypoint: worker-certificates + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-certificates restart: unless-stopped networks: @@ -340,6 +380,11 @@ services: appwrite-worker-functions: image: /: entrypoint: worker-functions + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-functions restart: unless-stopped networks: @@ -369,6 +414,11 @@ services: appwrite-executor: image: /: entrypoint: executor + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-executor restart: unless-stopped stop_signal: SIGINT @@ -414,6 +464,11 @@ services: appwrite-worker-mails: image: /: entrypoint: worker-mails + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-worker-mails restart: unless-stopped networks: @@ -440,6 +495,11 @@ services: appwrite-maintenance: image: /: entrypoint: maintenance + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m container_name: appwrite-maintenance restart: unless-stopped networks: @@ -462,6 +522,11 @@ services: image: /: entrypoint: usage container_name: appwrite-usage + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped networks: - appwrite @@ -488,6 +553,11 @@ services: image: /: entrypoint: schedule container_name: appwrite-schedule + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped networks: - appwrite @@ -503,6 +573,11 @@ services: mariadb: image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p container_name: appwrite-mariadb + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped networks: - appwrite @@ -518,6 +593,11 @@ services: redis: image: redis:6.2-alpine container_name: appwrite-redis + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped networks: - appwrite @@ -536,6 +616,11 @@ services: influxdb: image: appwrite/influxdb:1.5.0 container_name: appwrite-influxdb + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped networks: - appwrite @@ -545,6 +630,11 @@ services: telegraf: image: appwrite/telegraf:1.4.0 container_name: appwrite-telegraf + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m restart: unless-stopped networks: - appwrite From dd29f6b28806693ad20bc730c3b1f1cb979a4a96 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 24 Mar 2022 07:29:59 +0000 Subject: [PATCH 32/73] seems this variable was missing in production compose and .env --- .env | 1 + app/views/install/compose.phtml | 1 + 2 files changed, 2 insertions(+) diff --git a/.env b/.env index a6bea88b02..c205935b79 100644 --- a/.env +++ b/.env @@ -45,6 +45,7 @@ _APP_SMTP_SECURE= _APP_SMTP_USERNAME= _APP_SMTP_PASSWORD= _APP_STORAGE_LIMIT=30000000 +_APP_STORAGE_PREVIEW_LIMIT=20000000 _APP_FUNCTIONS_SIZE_LIMIT=30000000 _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_BUILD_TIMEOUT=900 diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 0780e51289..bdc961f540 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -103,6 +103,7 @@ services: - _APP_INFLUXDB_HOST - _APP_INFLUXDB_PORT - _APP_STORAGE_LIMIT + - _APP_STORAGE_PREVIEW_LIMIT - _APP_STORAGE_ANTIVIRUS - _APP_STORAGE_ANTIVIRUS_HOST - _APP_STORAGE_ANTIVIRUS_PORT From 320d4518b7f4e6c96b31135fc7c1a965e6d00e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 24 Mar 2022 11:01:30 +0000 Subject: [PATCH 33/73] Move network env var to executor container --- app/executor.php | 8 ++------ src/Executor/Executor.php | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/executor.php b/app/executor.php index 566f177471..d28123c224 100644 --- a/app/executor.php +++ b/app/executor.php @@ -141,7 +141,6 @@ App::post('/v1/runtimes') ->param('vars', [], new Assoc(), 'Environment Variables required for the build') ->param('commands', [], new ArrayList(new Text(0)), 'Commands required to build the container') ->param('runtime', '', new Text(128), 'Runtime for the cloud function') - ->param('network', '', new Text(128), 'Network to attach the container to') ->param('baseImage', '', new Text(128), 'Base image name of the runtime') ->param('entrypoint', '', new Text(256), 'Entrypoint of the code file', true) ->param('remove', false, new Boolean(), 'Remove a runtime after execution') @@ -149,8 +148,7 @@ App::post('/v1/runtimes') ->inject('orchestrationPool') ->inject('activeRuntimes') ->inject('response') - ->action(function (string $runtimeId, string $source, string $destination, array $vars, array $commands, string $runtime, string $network, string $baseImage, string $entrypoint, bool $remove, string $workdir, $orchestrationPool, $activeRuntimes, Response $response) { - + ->action(function (string $runtimeId, string $source, string $destination, array $vars, array $commands, string $runtime, string $baseImage, string $entrypoint, bool $remove, string $workdir, $orchestrationPool, $activeRuntimes, Response $response) { if ($activeRuntimes->exists($runtimeId)) { throw new Exception('Runtime already exists.', 409); } @@ -235,9 +233,7 @@ App::post('/v1/runtimes') throw new Exception('Failed to create build container', 500); } - if (!empty($network)) { - $orchestration->networkConnect($runtimeId, $network); - } + $orchestration->networkConnect($runtimeId, App::getEnv('_APP_EXECUTOR_RUNTIME_NETWORK', 'appwrite_runtimes')); /** * Execute any commands if they were provided diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 1a96b3561b..fff322161f 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -59,7 +59,6 @@ class Executor string $entrypoint = '', string $workdir = '', string $destination = '', - string $network = '', array $vars = [], array $commands = [] ) { @@ -76,7 +75,6 @@ class Executor 'baseImage' => $baseImage, 'entrypoint' => $entrypoint, 'workdir' => $workdir, - 'network' => empty($network) ? App::getEnv('_APP_EXECUTOR_RUNTIME_NETWORK', 'appwrite_runtimes') : $network, 'vars' => $vars, 'remove' => $remove, 'commands' => $commands From 2a512fb611716a39e26035c8a8cdc975058ded8e Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sat, 26 Mar 2022 00:54:41 +0000 Subject: [PATCH 34/73] zoom oauth --- app/config/providers.php | 10 ++ src/Appwrite/Auth/OAuth2/Zoom.php | 154 ++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 src/Appwrite/Auth/OAuth2/Zoom.php diff --git a/app/config/providers.php b/app/config/providers.php index 1691f814bd..9a6b5fb50f 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -231,6 +231,16 @@ return [ // Ordered by ABC. 'beta' => false, 'mock' => false, ], + 'zoom' => [ + 'name' => 'Zoom', + 'developers' => 'https://marketplace.zoom.us/docs/guides/auth/oauth/', + 'icon' => 'icon-zoom', + 'enabled' => true, + 'sandbox' => false, + 'form' => false, + 'beta' => false, + 'mock' => false, + ], 'yahoo' => [ 'name' => 'Yahoo', 'developers' => 'https://developer.yahoo.com/oauth2/guide/flows_authcode/', diff --git a/src/Appwrite/Auth/OAuth2/Zoom.php b/src/Appwrite/Auth/OAuth2/Zoom.php new file mode 100644 index 0000000000..3f0b95531e --- /dev/null +++ b/src/Appwrite/Auth/OAuth2/Zoom.php @@ -0,0 +1,154 @@ +endpoint . '/oauth/authorize?'. \http_build_query([ + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'response_type' => 'code', + 'state' => \json_encode($this->state), + ]); + } + + /** + * @param string $code + * + * @return array + */ + protected function getTokens(string $code): array + { + if(empty($this->tokens)) { + $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), 'Content-Type: application/x-www-form-urlencoded']; + $this->tokens = \json_decode($this->request( + 'POST', + $this->endpoint . '/oauth/token', + $headers, + \http_build_query([ + 'grant_type' => 'authorization_code', + 'redirect_uri' => $this->callback, + 'code' => $code + ]) + ), true); + } + + return $this->tokens; + } + + /** + * @param string $refreshToken + * + * @return array + */ + public function refreshTokens(string $refreshToken):array + { + $headers = ['Authorization: Basic ' . \base64_encode($this->appID . ':' . $this->appSecret), 'Content-Type: application/x-www-form-urlencoded']; + $this->tokens = \json_decode($this->request( + 'POST', + $this->endpoint . '/oauth/token', + $headers, + \http_build_query([ + 'grant_type' => 'refresh_token', + 'refresh_token' => $refreshToken, + ]) + ), true); + + if(empty($this->tokens['refresh_token'])) { + $this->tokens['refresh_token'] = $refreshToken; + } + + return $this->tokens; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserID(string $accessToken):string + { + $response = $this->getUser($accessToken); + return $response['id'] ?? ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserEmail(string $accessToken):string + { + $response = $this->getUser($accessToken); + return $response['email'] ?? ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserName(string $accessToken):string + { + $response = $this->getUser($accessToken); + return $response['first_name'] ?? '' . ' ' . $response['last_name'] ?? ''; + } + + /** + * @param string $accessToken + * + * @return array + */ + protected function getUser(string $accessToken) + { + $headers = [ + 'Authorization: Bearer '.\urlencode($accessToken) + ]; + + if (empty($this->user)) { + $this->user = \json_decode($this->request('GET', 'https://api.zoom.us/v2/users/me', $headers), true); + } + + return $this->user; + } +} From 293406eff68dbc671f1575772a7b23d6600e7da2 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sat, 26 Mar 2022 01:33:21 +0000 Subject: [PATCH 35/73] add default scope --- src/Appwrite/Auth/OAuth2/Zoom.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Auth/OAuth2/Zoom.php b/src/Appwrite/Auth/OAuth2/Zoom.php index 3f0b95531e..19bab05250 100644 --- a/src/Appwrite/Auth/OAuth2/Zoom.php +++ b/src/Appwrite/Auth/OAuth2/Zoom.php @@ -29,7 +29,9 @@ class Zoom extends OAuth2 /** * @var array */ - protected $scopes = []; + protected $scopes = [ + 'user_profile' + ]; /** * @return string @@ -48,6 +50,7 @@ class Zoom extends OAuth2 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'response_type' => 'code', + 'scope' => \implode(' ', $this->getScopes()), 'state' => \json_encode($this->state), ]); } From 7e604cbcfbdff1fe19f6b55c779e08248c24b9f6 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sat, 26 Mar 2022 01:38:13 +0000 Subject: [PATCH 36/73] fix name --- src/Appwrite/Auth/OAuth2/Zoom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Auth/OAuth2/Zoom.php b/src/Appwrite/Auth/OAuth2/Zoom.php index 19bab05250..9aa77ceb91 100644 --- a/src/Appwrite/Auth/OAuth2/Zoom.php +++ b/src/Appwrite/Auth/OAuth2/Zoom.php @@ -134,7 +134,7 @@ class Zoom extends OAuth2 public function getUserName(string $accessToken):string { $response = $this->getUser($accessToken); - return $response['first_name'] ?? '' . ' ' . $response['last_name'] ?? ''; + return ($response['first_name'] ?? '') . ' ' . ($response['last_name'] ?? ''); } /** From 2a188574ed68e40a5ca3e93abe8d3116be4ad947 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 27 Mar 2022 10:10:27 +0545 Subject: [PATCH 37/73] zoom logo --- public/images/users/zoom.png | Bin 0 -> 15559 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/images/users/zoom.png diff --git a/public/images/users/zoom.png b/public/images/users/zoom.png new file mode 100644 index 0000000000000000000000000000000000000000..a7efdb99e7841d6c2df867be2df7fdc1648870e6 GIT binary patch literal 15559 zcmeIZWmFx_(l)$tC%C&id*cuwxI2W90158y7Tn$49fFgf!3k~&?(V@MXqb2BzRx+& zIqQ4>JZpXLztd~>&|O`1Rn^rsvl-}#P*ah`KqWy1fj}7Ya#9-5pC*4k$Z*iJtgxvW z2t-%lrKRJdVdzff;AC%RX=6&|;^|;YW$IxGo%C2L$+mPOZ%zybjPX0*$NHSWxmRve zqi39I(vgW4qrU8Kx9~mf@#7^;q-aLXfHS|?drIF~?aGLXnH8s|r$~0bbx-w^t554) zIWf0qkF0~Y=BN8-S(B6=o%nYoxqfp`oxt|v=@sl`+Qg^pT?yCDS46LX{0{!}n>4fz ze$;mf``^4cXV%aVfT!*b!h_$d3ZHh52?l&SJM;X;x+#mgtlF)=f6LALeR-x+x2CYd z=+PB~mf9uhL5Oudm^I~zeYYIeOX@lOTV>mxP_!vhyt8q7zjh!pHkG97jCvCfW%@I=8a@X87 z-u1g%Pyu1z=J#j(q0V-Sn0 zv*La89__c)=7*j8rp-rx;#@iEut57Eu55f`8efH~el=ClhlLRP80NK zc-|=VnTZMb^GhcupHFkVx#A ztS(FX5l57Jg6E2@af0vhl9lb;c=xrozU|EkU%}^Xm6vA?$9Cf2wNj#j1uV$0j_Zyl9`{npD_el%ANF_x+eQVNu%t4)?O~ z+XUe#rOQR9OCpNs<$ITvu(N1CVV23?T~B5TPs8@lT{qbY$Im7EzPHQn?{!%uue^Q^ zOAyZ@HmFh_cmB%h71pjT_ssh+K5t+3vTxzaP8dgMQ~Q32 z14)R#QQ?AGxu%JZ`GtIQ)$zSAgG2=y^|6X*++in2G!0SQ z6g~s!xLV5vKR*+kWxsS;3l=1-$!0|&^HA8}aIA{IQebRdGJlU|-<(~#7{#@rU%^Ll z`dY_wGWZuu1hUWquWIMH#IcCjw_N-%T+)@ge%L(LVEBsBgpU1r~fQt%+`EO~Esbv1re7=FB80r6M@ z*+TqJ1rz3WCe>#(!2XxZ#n3B1-dlv`GhL=cl`%FJO#X**e_8`g7%qbg7vythB9_$1 zfNcGbO6$R*g0JBe0_$CEQSqCW6lbU=+u+p0X#@DIjB;t`j`)-cdhzv;Yr657U9f*O zx(k=;+KH@o%iy&oIbD>E($Xn@@ctshH{dGPuxLjYHXK>HN;SR^bnvc3AZp&H*6#J( ze$N*oZ`xk5xkR!8e>DDA@3TzEI*uf$Y#KzGhP5ASczc3Jc>2Ei{L01jxEh?)b1e`_ z%n{J?Q2H6)LlCwkuOHP9tiTP0o2ROCiNOgIqlP-W?%4*6$-GaMsvAd0jGbYfkHEmH zLF;#35K7%1CR|01r$_evy6BmxtucH1G`eBQ@;#yqDZDTzJ^0@bF5W@;H2OkkRakhLV1n_c+QJbUcE6&aC#vyw zxAD~xABK!iSaWldsue~aR?~mu@lS=r=firrTCQS9uTu&$8WKYUF4mzZ11;ug~(FQoOQ<=9G%Uo0`2& zgcyEtrkGeQYVq)N?l5?LZIh75gt)72;q!MbSYmCz#myV5G@Z3RQnX~r6*m8V=>SH^6mSpr_5*btET58(H=FDYg7Pdc%XkmB+-x1h@B0GKUo}UGY zwu;&4*IsH=g_E=x>Emgk+JvnMTT$M@8j&)AFj(k#R&9^%L>#UQc zBmZ-SOf|%&MwDNP*kGW5{s6}(Fi`Ahrc^*t9h72D434_MCYhcP;&_yw11c@{KWjjIU)A%6*B}br>XEF^6>)3}aDk->t69HY zIFb!zotm5a2T~4?ThZ>dPn8)SCqCG3`E^Bjp22#W>?$Pf@>?g7P=$!^tS@5i06LCY zN}t&rg8VV1nshj`qr&6J8J6ezv&-FQ#g$5X7m}r<7sFCYdWAEVVJNH6$1~=XHTk~f zo-HY#;*jKnJ&@~Yz&4uJA?(d4N+%Uc^0@D>?XX!(B#9BPstp?_9_f(7-{Z+9rcjzx zWvozD3~BW!T2Fs^9X1zTX;tL!BL5_T&Y3kvO7^-^#R6+X^&6=n!#s@DC6-R$@%dW; zII1B38=UeDA@rB^mn89-!Lb2Tj4x<3%lw-|Q(=u?%zTjPacFaXNgH3viRmJcDC9Oe!MjX)QP0cA!>`Lf8T92t%AzQgd_+fe(iv3t|wVVu?y+TU?<)DCc~s){h+d*h#v>>oeBZz z)M8!dZ4LCp%3Q4oa?Jd(S|MZjs1~#hOFI+{*L=)QVyco?!E4NOl@1)@ef&3um%pt! z`n8{ql^_5(MU)$vMmqtHNt0ZUhw$85;d_<}-#ALJB%v5~9RbkPhIoO=ZbMPLW|g2W z#?ID8&d40!B*s}xQJ!BwO&xv}5s~JCVfgVS)r{aBxtYt0uYq{>z@M>vCknj*> z&CAj{xWa?BI^whS&ef&R5U2@8aMIL~X5LO<;4PW z=Y=}~Z1esAJL;TtXakDBCD=p%h*4DYB5Hd1=D;Avoe`;}3;%1~zg70SKW z3e>n}&=Ru?E#eAk=?XJon{E&1kyS7vj9*WD$1(FPjv~TpjXT0#Qg|=nw-s^JNJk}u z=bJ!skEQEi-}U;uh3K=jWR`mM0q>1!yv-NH97n8b9m*6YyDVw4OO1BiXst#%6)Knp z#!Sq?O%8A&oF@cnQ7h;?`Ho=W{F^rvv{S2R$CSbiDQHmVG{y$W~W>r?(Rl zEe0l)2N_>CZBAMEZ2*gB)DK&)1osZe3f2(kGMF=*vh+Z?CA~S`Plb)u7&3+O2|m&o zUmx-*3|&NPTx)~f)e1q#K7%OxrmU_egSq_W{UnJGNKWqJumJ=;2P;T*9;yhy2ggiI}u|5JT1AYcpFHv#kbrsvQD8DO;KWxFba)^A1 zn?PSLBN6`W>b?JuDu&0D7X|Ho>;|qYVKyeOcV75&#pf91Eg=Ov&`XXFhGYr7oHCdQ zyq+ zevu>1s7fYcd(=&EOPvJ55}=@P{N^8h4uf+jR`v3@q$zZiyY!tuox59yD)|=d0|np@aSDP$+no+OT)-SoNErJB)Fd@xH=wGcVEo1r4{nx9E}Ge)ccZ>l57S42 zF&CeYND{fDT#vs79N2}r7@bIrSN>4+{9?tRYCyqgi`>m}f2i*NP=^sBFlGRkD@J{A z{WSd*NY!{JRMkVvWSK&Xl}KKzNY&)}c*fh1z=xPy&?v`^3b!eeKf|t`IfY6@;e(=O z*n-*QMh}b3!EuwYi8-5K<0DLTt$q09xG9iTQ6U*zCSU3(=%Z>7pNB+PaKIuM{$_|g z?}G8|@l{W3Qgx5$h+1CYSa7lvr%Q6bD1IBdtF8z#L`<+4`*l%&PyrLS)$1r)9oQr% z7aDXHwMBM_macZ3mSrfGE`h276J@qktnmjLMDS+y2Kgzhm=k>n2r1~e^88#!$Ao@c zJ_Hj91{Q7;SKQvU+b&J-f!ILJjx)_h9DXi?2MedVb(%%ZHwuqR9M432;UI+V$F2}v zT2=3D~uaM3W6ZwmIY7UbRkprW+zwWQ8I0 zBwl$^Weo3v;#opWn$S|PdSzUR{Szln4K<~N)HhBhTc*rU+GOCK{>bB4u;umXCtZfw zsQCgI8Vz=e@@F>q5kwT7b@nVsI@2Lu-Za8Gfp1}zJ>g6nTi;pMjWNX!qF{vBwn(%B z?92y&JEY)m?gLvlbuPWANE6M;i05*wB0=sKu3o z4u`P%K_O+k$pslhHoSKRfm3&(g~9UHF06bG0(>J#H++Y}Pe<^R?|wpL2YlJivWuma zL%O334mI*!BR%u%nd2(PJv+zYt}>8y2P=zzWXXA4lqSjy+HqkUL;6k`5Tuamz?%=^ zcEemv3=laCE2~Iaw+kLN6qkTe26E9rwAk)LywFAnnk6cSLkZn)^k5l>?+Uk?wXRE& zEm$mg1qvba=Mu}wQ|N|$6>mLH5x)u?%(gh`C7_sw(|j0EK+!vu4qZ8Ajm$^KyLGEU z)`N`9gJU;oLnAgAXXt&#lrbW8rgfQ`&7&ORu#!^45HPsC-(#4= zE@`Pp&dHl`yvL+7_EI1=@D9>nLh*V)d^vJd8@TF&d-5UZH)UAcJ;R&fFJ3> zD_=9;i0e2pS!1DZ$;szEZ_?4Dx|j9BwgdfMVhF&DSeAODoAV$zWFLvrOJeAX|NP94 z0*33^!mWfv>7I5)I9_2a0B<06zVNL^!V*jExF+mUJ6{)F3h9TU+SHI7qb=i!wQL-I z(|z+}&K59Q(heYP@OxBu@)=m6L=f3LfQ--z3%3`%kXsP4Tn`$LPsj; zs_<9LC&~9N0kw7zyoq8N;G&wReBsfr&l&1kb{F$~VYV{UO1JD?owfs9X1ZCWkV@o7 z8fqpBZP|>S8d*7P`<#4bFez_5*2@)~)*3jx@Qy5@X6baH1R+$RNFt4}+3nFotwcuO zQPRwy-26SI7|k(%YK(L$Un;MbvL!vW@ON04GsRjJ%q?7b7wSdwcQq0DQ^ho{4Uuix zVCJHVvbNbULsKfmjF8Pq5{;#JGtLYXv=!vt!}9BTsjn512kdjIR0hep4nEwKg%|>W@xC>W(;5OqaXJ;;K|K+!|^($LL4YF z;1F_~Tb9g7DofN)rz=eoZ|28pV_ zb@sjja}DMVxwz_rY!FTr;w_W*z9yGHYD+Aq!k4>Zg=OfMip)t^K?ntka8CA0>$rDa zeT9np2pnagrF*rPfzm|@>lN%T>nlVF6sHb|mkh%lQdY@2lB8;2 zUYR6^s_6w>90RhgtFg*f)mdJr%@E%&4&e+p8ngT7$$He!ZoABRt+cGjRxf+by|RXm zp5iyoR*)}ANnK;qdOq?J_AwU9xKpw9Q&{b;{DRC7NaOQj^VqcTSqQOKrEd~RMevpJ zS<)~uux(J|;WANy#8G?PO&aCy=x_C}op7eC;3%o*Bld8KGUtbtvdRgoq}Uo7f&=)_ z*xc|ePn>2cr~~{{mae`jd&ea=7YuFPzjeuO%#zb34(CU8Ds_7EWy3BAh8OAO2d13X zIigrPbfF=RAKLjpr*Bv*(MXp_U4tceDZ^3m>~xPJ@V{I}z4Pl{6D2`Hky5j^6-@s+ zQTTP9ho|NHCK&sfGNASl?)N52OSi!l)A=Bsw9y`5{wA z5Vl=Z*BNojpelp6%NT_t`R(_wfu)W=Ea7{RlW(|D6v@5R@{~f;?Es|<>>@*)r}1_e z9nD6jw)askTwS zQt|Qqn5}z*Lr(2Ug|Q^jzzO#A?zeoIB$@(ZtZ)(kR`Zu;TktF@(y{~*AIW=h?_EXs zWgzu}AdF>=4m#P3c^pXoQ6(mA=la$2=PWo#L1mTIC(2+akk8Qk_e7afa_komeY&%$ zvkNH?J|g9<0ec~?-goL2-_=X^<_bXQhzshZ!?$WBT!b0b?-7wR@jo4H$&$#>s7)p&eb3z4WlygqVv?_iccS9 ze-iw3RikM8DfAOJ${z2Cc4TZ!eT-afs4H)rT=5|t_1jXKnV@`9>hhWBx%F5*mdNDJIIIb1RbDJ$MSaStCbdPO#_3LLnnXc774!=o1 zhSV+cUMA{2Q47i&4gt~kw{bIzzqGVOZly^l}q+bW=;RVF@yMzXS?K4fl|qm#i#G-I9?Mt}I(j78rJv#r6k~Gsau;JWbk|O*uknu6D?aQBD%!WrIH$g^xMLSF zKMZ(m_D-$2;y|$Q#|jp8X-Bv?D!`Sk`+jsSK&bu+^3!AAN>#p?hB7DK$D+6`m9a9S z49{T^o0&kU7zIu_o}`{@oUpeCsU1;6f=VxGuSi^qyx5$4c)gKIpkf+5pu zm>ivVQauWr-1DNkTUXOkHQJQHu(6+FkQE(ddo1`pkxZXli{{!BcN0r zZ&+dEx=eA8*Tkx`6-bRG4cxM%Zsd8cbyMItqPG@?C&Spwc@a=NYc6V{#`W_hrG~59 zCug7WuM{;Ps*N(lQ>VJJ>z^kvEA^izV^Vz2Xsoc2o=YdNBrIglO~geT_gbui}$5;dm3 zs&bDaw_#{;#6{n-m(RfO%3P!o`=3QL(gM`&Z74U@nuG}TZSqlh{1>+jd+qHzFrQ#^ z9Yoc0T&HP+RszIC28^;0VGBmz!v!d_zsmi{4&_*UcFQ$p}Owm+Zf8DV@+7|3&5Xy+=k1qp2AoEm8V(XYn$0O%(4PUK=Kw+IY&6f9!?zo-H@*{LT5R)=@{H zA6|FXpiMe1rS}vOTRWr*5YjaRJ@(*6-$WCU)_bkzYpCRkaTw+B_9 zq=H!F$D?pOR-QyPwt$9+R19Td?5dPG(lyVHr05mN1U&)ITZKCX#GcSk;)N?T`U~0b zq!3C@Qn?6D zG3rio9=xp%x>6}&c1Jf_Ikc`+4SSm~RH|=Sb04h9eik}Tv(JmCU`hMcm8AeP8$HOy zp8*?3(F4)2TeHiv1;dWBdy5i$=om_jw`6XC9q&C9-w#=ZM% z2Y5r367Cgu$%~)$@7f;7%!NcmGOUAZ7ao1&sNXl|zBm*jnlMoR5l))zm^53ru!u7B zl23|*Zk_K3J#AcKFLk*!8oRS%<##mAw)C9kjwUx@9ToZGvwe)JBDH;(+~j1VXY4Wa9VP$nKecq`7yA=SlD)>&8LN$w;D6!_d91e9EJ`dj`%F1?P)S< zlNPrD`34enx-B#^1aJ&fH~9%Wje8>9F^#RIMG^rd$Pe70jv{VYX}J?eBGzp9W6YV`%zAQHpX>O@aWP$w zhcg20E)}Lq89nV2EgGf-Yh+%}A83?D3QtCdfVijbGR%;&auEZ0T7K1G=BpME;Hx4T z#;DD}+0L+9yAdu31)e{}wkvQNg7yk0tHiQ_C zzA~uU`)So~%DPe%`gFsk9Y=dWhccO)UlYy*UxCDb(7evcfYcM?9^8zL7oRJCufl}6 zz3HQ^+H+KZ{z6a)Lz#UOd&Y8hM@wo!BJSD%<4ad;oM&<##i#p0)I=w7_KD=cmFsKH z8q&Jhts8h6PK>$PX#(vsU9^}QMz}^yI_(w&dlL~01v@#wTOM%2GAoQEwJ9(u*fa`x zz^@l%D-j>4h6|55$;-tk*8~F$Jwc;h&u>n?m2Oj;U?scuiei12j{}EK2ACMA8I`P{ z2o>LZ;mn(oFS5YN@0K%y(2h_rI*Vy%2+E_3(U|B2QN!`U3748wFnj1mJOBm+u5tVk9&Om0Yu#gnte5Fw9-1lFAk#=R2Lg zR$JWX?v!`m65S(@p1JDQa{tk%Xx%FzZuSD!GW#^#W)-PlosyQO<%d`9#zzL4Sk~{| zOiWt&2r9_1%sHyDzwQyqdt3J(IuGBDUg`W)z$ibO!Hp&{L6zVzm>AqYe_d8#zS3kz z>BD6>Ukc%211ARyF!EZxl~$T5HZPqy3ZQgNoTHVD2dU`~Nsi1c>J}bPd&HuGL_js0 zJhhfIWrP01pYQI89Hs%-?W$!OBD@lHnKvlYUu)n+dW-5WWm-W(iA2~|N>_JsAK;Tq z--an{@xbKb@O#R3l4)Q(TbnTEKp>bPOG!yJc}dBCZdQVBQOf?9AR^Z%M)vK)w1PAXrW=;)kXjB~ zc%*<8exw@p3~IGdy50kVGD#vHp={5Wjg3L0*`9B2-yppa$9e)ex;SaLB;WvPc<=f> z99H7oZzY?5RndLw-|shO(2u`MIF1~&&yM0i6Xv!u`*GE; zZdAX}qkz-o_%W3mHb?WKIONy(il@hDSbw9dFzA zp?s-w1&=HW_r`1agDr?VuXuj>-B09$Wkime<;(^oy;BgJYN*Xf4PG%b9%}a^@kdR} zgDwQGxvy*Q9tA#vxMp4-Aqoh<%S0u2oL-%tPOLqPOdp*gfjpf&I}r>&L-&-CSVH%X z=_o4+8Qa@(7@F7{nR0m8Izac9fk48qJRA&-txa91j7-ff?L=tK+Pi3|EKNjc-ta1e zl^rBaEiC1{oJ=*nRJ4q}tc?XtXkLk;3VR4a0c=fO45>V9ZS0(dJVa>z!WDw{|A;wh zsQyxMu@<4xQC6dpw0AP4;^E-o0JBSbSh{i1h@w&nJDHdXX-LWZ0|Gh{p|NmraS-C< zba!{>aOdW*cQWUM2nq^vg1I=kxY(f@?9QHcE`}cLcFweaApXXXGIcg~vUG5r5IKZ5?ww(WN;p`&q1_k*? zK>t?@XD#R!JWdT$XM0yCV^e82Q#%*he}^zJ{+GRjtCP)N>6jREn%bD!LRFoiULpVC zQdVAB?OzsuC@{CQb@%b14_W^a+n<@g()ss5pyvO={SWPb=Khy5R7+V| zNXp*W^-p;6QX({e{0o`b8(W$P{na(%g+TZq{1A3-Q!_Jm9^%JZ-0X%BelB(+Q*Iux znSik=4-eO0P$tGgGWJfkhS24-v^6w0<#ez!|7+q8;X>kS@**@`9DfJ?mqg9R(8UaD zAVQ;LY3J(kKdM@mwx*gchJV`7dj2QzvI=CH}#LfH}DT z#{IJ_LeONO#2WsoQz*bcvlNnaGBtFucha)Aw-KTF13~r2@~`ry68?Kp;u!Zzs-%Zl)%GIfB~#J!NcRXlHH;y}tiZQ2&%$ z{$Cc0i(AmhjF*px9lE+a>^$5&eC&c|MkegMCS2V7{QQD^V6gFjqC4B0xwsoTnTnf3 zGlgaYEug=$pKZG*Ylx%jmpU?H%e5QLW%%qzshOT+n(ggO6Q z)&I;`nDhU`iSS=0E6#u2uKvN<9~%E3wtuX}|3eQ@=>IzTU-A22 zy8cVo|B8YCmGXb9>%VmUuNe4WDgU>+{(qwj^?x3COzoh*1-U~XXI@2&or6GdAT=c| zX;}xQt*y<*#^Uku@wK%TXn$vCYinzJb8~ZHVc}128+vSRY^+U8j6sD^1*mXgVF{`R zJ=WLPp_0A5-Hna)za`KiR0y?#ww;~r<>h7QaCdhbItvvZ9v&<&uR`Teq_MHVogJt< z=&=o*+T7fLnn2G`FHm>TE>ym|yK```KRY`QmF@5ELWTSLd)wO^&;~VuD*UYjl|$8_ zaYBbs7tkRT@$hi}=;&Z+X&LGr8sWjgE>vN2a~+Cs_@^EG{P`0A0EK8kF&dDL07QcU z`6vLI$l(Pb76S120#K)qPk?GXAQ1*6v;t6A?vKFw`WnR%2>1iyp}_Co&u3?+JbnPD7a$x2JU>4}qY?-JPEJmQ0)WfQ zi(kKP9v>f`o_^ooKNw{J>|W4>p1FLXhJb7o^!#*t`>SRYkPZj#?tbZ|K@pzVJOP7D zz`X+C_XA9FfQyTBu~1-g6S%wu?wjSWF0k3?>L-Ak zdmyd_P>uy`3IVM|pnnNCy8+hLR)1^(9kYN)5HPq5SmgtsMu46LU||mkZ2(>c{~jpaT>KxwpxTk2!yaE zFD0&Jv9_BzX}zU_*Znwo{i>1{odR{On99iL1-*xy>K>KcFEqj6lOEmj&pNWK6{|~> zRcz8y8f{f*UrIjnTZ`Ad+j*I!lO=_FHTwS7s)DO%=j~pH=ha$O_3ux;bcw_8n(w|J zA@7=G#EJ0N2@iS*ri{`DBG{aB;ZKI5C&p+p`_dAk2S{r4eeR5%*$^Cf)hm|&tzyb6 zHu&j205~&dhiLfJ%Df0Jy10`Q5C8;OWX#G1;sk1=$td$+S(@KSco4$obg$MqxRPR* z5iKrrh$V*RFNdwx8Ga;ZUg@Z?c<2`)iV;sPl>%f}1Hrp9XF{1m%W_VK_U~Prb$%}5 zlxF7^8Z|Vqn)2`-EPWsl!0}jm6C)#72Hi9h(>n=vVA~WIzd_%3$b#TN@b!fQxv`e0&!`kmgoF#$UwZi(nFk>Em+Y;nNz5&jOZzzFw| zOm(YhKMm%GJ`U&Q7JF!&kb1Y-c$U#wv_&|r8o zNBWH+7)ziVF={eJG2EkrAi7>|?~D`mso&iP^BEyP{zYC2apRkC8fiWOWJMp&tg4V> z)_Nq^zB+km~s1V^1jDguj70Mqb`M{Nf?^b_$5cBzS?Fe)GEmF&_x@6kB{cB z`@-U-KWb#rdL4KD-964P?QR(>9^0lCBj^kC)jv78d#&wa$w&@b_-DvMlor#QZeEin z%0&xt?gALtQ?LNvXpF#cRG_!qfw=SY@#gh5!;sn;p3`U9UJ9zLVlw|OtHyDI;BK_+ zE}S+d=2I{KaQ(ztPDuhRUO(y_#kB$?0={Olk@K z`!p(93fvvFdX;#!JgR-o-^cyT@cw1|vK7A1Q-S6a)OFs5B`ELdlNyD6H)EWUV_S8- zsDpoQOg^UCaL{$vMxY^!lGhT7%N39;*Rw@HUxFZvk8@sYqRV7Gbuev`ZubYN`4R3@ zExcI_-rQ1*goWFEwiT3mv(&I}tC`^?#!{GFztIW7KRUlH*G{)t8Y(XDLM}!qDLfnL zPN?6|Cgo4rTY2qoo2tvF!3R{Cy|YKXnicPWUq$dn5gJq}5x8TGaR#2b|&nZsgAaL2U2TCBX59 z-j1wR?9H|y;Iyp&zNpIcIg=4tU|5&nZ8Kk|jM#DKuCvYWuXC64mp}Ro$=H z-y0{(PjdvNe))dfxpY8hZkka77f|>@LI14~R(h z-nsjkGZ^CZ%EM;!oqxJKAe)+(A`BV+Pz~#5&%jI|qHMNZDM;|_V b{(2?5c#?j@E%)ae0VFT2B2^<{5cq!p1w?~r literal 0 HcmV?d00001 From 08146b800fcc73263ceb36a4232cd50510c9bb1a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 27 Mar 2022 05:05:47 +0000 Subject: [PATCH 38/73] fix using internal id --- app/tasks/usage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/tasks/usage.php b/app/tasks/usage.php index b659740c14..aa8dd2371c 100644 --- a/app/tasks/usage.php +++ b/app/tasks/usage.php @@ -565,13 +565,13 @@ $cli foreach ($parents as $parent) { foreach ($subCollections as $subCollection => $subOptions) { // Sub collection counts, like database.collections.collectionId.documents.count $dbForProject->setNamespace("_{$projectId}"); - $count = $dbForProject->count(($subOptions['collectionPrefix'] ?? '') . $parent->getId()); + $count = $dbForProject->count(($subOptions['collectionPrefix'] ?? '') . $parent->getInternalId()); $subCollectionCounts[$subCollection] = ($subCollectionCounts[$subCollection] ?? 0) + $count; // Project level counts for sub collections like database.documents.count $dbForProject->setNamespace("_{$projectId}"); - $metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.count" : "{$metricPrefix}.{$collection}.{$parent->getId()}.{$subCollection}.count"; + $metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.count" : "{$metricPrefix}.{$collection}.{$parent->getInternalId()}.{$subCollection}.count"; $time = (int) (floor(time() / 1800) * 1800); // Time rounded to nearest 30 minutes $id = \md5($time . '_30m_' . $metric); //Construct unique id for each metric using time, period and metric $document = $dbForProject->getDocument('stats', $id); @@ -619,13 +619,13 @@ $cli } $dbForProject->setNamespace("_{$projectId}"); - $total = (int) $dbForProject->sum(($subOptions['collectionPrefix'] ?? '') . $parent->getId(), $total['field']); + $total = (int) $dbForProject->sum(($subOptions['collectionPrefix'] ?? '') . $parent->getInternalId(), $total['field']); $subCollectionTotals[$subCollection] = ($ssubCollectionTotals[$subCollection] ?? 0) + $total; // Project level sum for sub collections like storage.total $dbForProject->setNamespace("_{$projectId}"); - $metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.total" : "{$metricPrefix}.{$collection}.{$parent->getId()}.{$subCollection}.total"; + $metric = empty($metricPrefix) ? "{$collection}.{$parent->getId()}.{$subCollection}.total" : "{$metricPrefix}.{$collection}.{$parent->getInternalId()}.{$subCollection}.total"; $time = (int) (floor(time() / 1800) * 1800); // Time rounded to nearest 30 minutes $id = \md5($time . '_30m_' . $metric); //Construct unique id for each metric using time, period and metric $document = $dbForProject->getDocument('stats', $id); From 0a1fbcd23de81eeb926751694cd6ec1c7311b266 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 27 Mar 2022 08:01:50 +0000 Subject: [PATCH 39/73] add missing attribute keys --- app/controllers/api/projects.php | 2 ++ app/controllers/api/storage.php | 2 ++ app/http.php | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 2bee190628..f172bc37ec 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -130,6 +130,8 @@ App::post('/v1/projects') 'signed' => $attribute['signed'], 'array' => $attribute['array'], 'filters' => $attribute['filters'], + 'default' => $attribute['default'] ?? null, + 'format' => $attribute['format'] ?? '' ]); } diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 97e82b553d..856e898113 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -86,6 +86,8 @@ App::post('/v1/storage/buckets') 'signed' => $attribute['signed'], 'array' => $attribute['array'], 'filters' => $attribute['filters'], + 'default' => $attribute['default'] ?? null, + 'format' => $attribute['format'] ?? '' ]); } diff --git a/app/http.php b/app/http.php index ab6679e7eb..d36c59b296 100644 --- a/app/http.php +++ b/app/http.php @@ -132,6 +132,8 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { 'signed' => $attribute['signed'], 'array' => $attribute['array'], 'filters' => $attribute['filters'], + 'default' => $attribute['default'] ?? null, + 'format' => $attribute['format'] ?? '' ]); } @@ -187,6 +189,8 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { 'signed' => $attribute['signed'], 'array' => $attribute['array'], 'filters' => $attribute['filters'], + 'default' => $attribute['default'] ?? null, + 'format' => $attribute['format'] ?? '' ]); } From c6ea4e734bb7bf7ae97b247bc4c019b8aa608a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mati=20Gumm=C3=A1?= Date: Mon, 28 Mar 2022 22:26:59 -0300 Subject: [PATCH 40/73] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb7c3ec022..c74b33cc2c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ English | [简体中文](README-CN.md) -[**Appwrite 0.13 has been released! Learn what's new!**](https://dev.to/appwrite/its-here-announcing-the-release-of-appwrite-012-5c8b) +[**Appwrite 0.13 has been released! Learn what's new!**](https://dev.to/appwrite/announcing-appwrite-013-with-major-upgrades-to-storage-and-functions-3hpf) Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster. From 586c3af5dfd90070ca51af196d67cfbf2037b795 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 29 Mar 2022 09:48:49 +0000 Subject: [PATCH 41/73] logging limit update --- app/views/install/compose.phtml | 115 +++++++------------------------- 1 file changed, 25 insertions(+), 90 deletions(-) diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index bdc961f540..f25cfdc35f 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -1,3 +1,10 @@ +x-logging: &x-logging + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m + getParam('httpPort', ''); @@ -36,11 +43,7 @@ services: appwrite: image: /: container_name: appwrite - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped networks: - appwrite @@ -138,11 +141,7 @@ services: image: /: entrypoint: realtime container_name: appwrite-realtime - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped labels: - "traefik.enable=true" @@ -183,11 +182,7 @@ services: appwrite-worker-audits: image: /: entrypoint: worker-audits - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-audits restart: unless-stopped networks: @@ -213,11 +208,7 @@ services: appwrite-worker-webhooks: image: /: entrypoint: worker-webhooks - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-webhooks restart: unless-stopped networks: @@ -239,11 +230,7 @@ services: appwrite-worker-deletes: image: /: entrypoint: worker-deletes - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-deletes restart: unless-stopped networks: @@ -285,11 +272,7 @@ services: appwrite-worker-database: image: /: entrypoint: worker-database - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-database restart: unless-stopped networks: @@ -315,11 +298,7 @@ services: appwrite-worker-builds: image: /: entrypoint: worker-builds - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-builds restart: unless-stopped networks: @@ -346,11 +325,7 @@ services: appwrite-worker-certificates: image: /: entrypoint: worker-certificates - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-certificates restart: unless-stopped networks: @@ -381,11 +356,7 @@ services: appwrite-worker-functions: image: /: entrypoint: worker-functions - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-functions restart: unless-stopped networks: @@ -415,11 +386,7 @@ services: appwrite-executor: image: /: entrypoint: executor - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-executor restart: unless-stopped stop_signal: SIGINT @@ -465,11 +432,7 @@ services: appwrite-worker-mails: image: /: entrypoint: worker-mails - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-worker-mails restart: unless-stopped networks: @@ -496,11 +459,7 @@ services: appwrite-maintenance: image: /: entrypoint: maintenance - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging container_name: appwrite-maintenance restart: unless-stopped networks: @@ -523,11 +482,7 @@ services: image: /: entrypoint: usage container_name: appwrite-usage - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped networks: - appwrite @@ -554,11 +509,7 @@ services: image: /: entrypoint: schedule container_name: appwrite-schedule - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped networks: - appwrite @@ -574,11 +525,7 @@ services: mariadb: image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p container_name: appwrite-mariadb - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped networks: - appwrite @@ -594,11 +541,7 @@ services: redis: image: redis:6.2-alpine container_name: appwrite-redis - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped networks: - appwrite @@ -617,11 +560,7 @@ services: influxdb: image: appwrite/influxdb:1.5.0 container_name: appwrite-influxdb - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped networks: - appwrite @@ -631,11 +570,7 @@ services: telegraf: image: appwrite/telegraf:1.4.0 container_name: appwrite-telegraf - logging: - driver: 'json-file' - options: - max-file: 5 - max-size: 10m + <<: *x-logging restart: unless-stopped networks: - appwrite From a1cc57fbc7232104e27b4cd0bfb4fa42b81d7043 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 29 Mar 2022 09:50:57 +0000 Subject: [PATCH 42/73] log limit on development stack --- docker-compose.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 2ddd5dd51b..3521b64bac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,9 @@ +x-logging: &x-logging + logging: + driver: 'json-file' + options: + max-file: 5 + max-size: 10m # WARNING! # This is a development version of THE Appwrite docker-compose.yml file. # Avoid using this file in your production environment. @@ -8,6 +14,7 @@ version: '3' services: traefik: image: traefik:2.5 + <<: *x-logging container_name: appwrite-traefik command: - --log.level=DEBUG @@ -37,6 +44,7 @@ services: appwrite: container_name: appwrite + <<: *x-logging build: context: . args: @@ -152,6 +160,7 @@ services: appwrite-realtime: entrypoint: realtime + <<: *x-logging container_name: appwrite-realtime build: context: . @@ -200,6 +209,7 @@ services: appwrite-worker-audits: entrypoint: worker-audits + <<: *x-logging container_name: appwrite-worker-audits build: context: . @@ -228,6 +238,7 @@ services: appwrite-worker-webhooks: entrypoint: worker-webhooks + <<: *x-logging container_name: appwrite-worker-webhooks build: context: . @@ -253,6 +264,7 @@ services: appwrite-worker-deletes: entrypoint: worker-deletes + <<: *x-logging container_name: appwrite-worker-deletes build: context: . @@ -296,6 +308,7 @@ services: appwrite-worker-database: entrypoint: worker-database + <<: *x-logging container_name: appwrite-worker-database build: context: . @@ -325,6 +338,7 @@ services: appwrite-worker-builds: entrypoint: worker-builds + <<: *x-logging container_name: appwrite-worker-builds build: context: . @@ -354,6 +368,7 @@ services: appwrite-worker-certificates: entrypoint: worker-certificates + <<: *x-logging container_name: appwrite-worker-certificates build: context: . @@ -386,6 +401,7 @@ services: appwrite-worker-functions: entrypoint: worker-functions + <<: *x-logging container_name: appwrite-worker-functions build: context: . @@ -418,6 +434,7 @@ services: appwrite-executor: container_name: appwrite-executor + <<: *x-logging entrypoint: executor stop_signal: SIGINT build: @@ -471,6 +488,7 @@ services: appwrite-worker-mails: entrypoint: worker-mails + <<: *x-logging container_name: appwrite-worker-mails build: context: . @@ -502,6 +520,7 @@ services: appwrite-maintenance: entrypoint: maintenance + <<: *x-logging container_name: appwrite-maintenance build: context: . @@ -526,6 +545,7 @@ services: appwrite-usage: entrypoint: usage + <<: *x-logging container_name: appwrite-usage build: context: . @@ -558,6 +578,7 @@ services: appwrite-schedule: entrypoint: schedule + <<: *x-logging container_name: appwrite-schedule build: context: . @@ -578,6 +599,7 @@ services: mariadb: image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p container_name: appwrite-mariadb + <<: *x-logging networks: - appwrite volumes: @@ -606,6 +628,7 @@ services: redis: image: redis:6.2-alpine + <<: *x-logging container_name: appwrite-redis ports: - "6379:6379" @@ -625,6 +648,7 @@ services: influxdb: image: appwrite/influxdb:1.5.0 container_name: appwrite-influxdb + <<: *x-logging networks: - appwrite volumes: @@ -633,6 +657,7 @@ services: telegraf: image: appwrite/telegraf:1.4.0 container_name: appwrite-telegraf + <<: *x-logging networks: - appwrite environment: @@ -655,6 +680,7 @@ services: maildev: # used mainly for dev tests image: appwrite/mailcatcher:1.0.0 container_name: appwrite-mailcatcher + <<: *x-logging ports: - '9503:1080' networks: @@ -663,6 +689,7 @@ services: request-catcher: # used mainly for dev tests image: appwrite/requestcatcher:1.0.0 container_name: appwrite-requestcatcher + <<: *x-logging ports: - '9504:5000' networks: @@ -671,6 +698,7 @@ services: adminer: image: adminer container_name: appwrite-adminer + <<: *x-logging restart: always ports: - 9506:8080 From 88e110b3383d6ce8c2139604fd4139bdf224fed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 30 Mar 2022 17:59:19 +0000 Subject: [PATCH 43/73] Cache library upgrade --- composer.json | 4 +-- composer.lock | 84 +++++++++++++++++++++++++++++---------------------- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/composer.json b/composer.json index b49224ba05..821f9a239c 100644 --- a/composer.json +++ b/composer.json @@ -42,10 +42,10 @@ "utopia-php/abuse": "0.7.*", "utopia-php/analytics": "0.2.*", "utopia-php/audit": "0.8.*", - "utopia-php/cache": "0.4.*", + "utopia-php/cache": "0.5.*", "utopia-php/cli": "0.12.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.15.*", + "utopia-php/database": "dev-feat-cache-upgrate as 0.15.1", "utopia-php/locale": "0.4.*", "utopia-php/registry": "0.5.*", "utopia-php/preloader": "0.2.*", diff --git a/composer.lock b/composer.lock index 4a9b786b33..79c79e9d23 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3ef20ad6919a1844f207e06719ad8929", + "content-hash": "620799bd853e7891fbd5484a09d70dff", "packages": [ { "name": "adhocore/jwt", @@ -300,20 +300,23 @@ }, { "name": "colinmollenhour/credis", - "version": "v1.12.1", + "version": "v1.12.2", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb" + "reference": "77e6ede2e01c4cfaade114fe1e07d2f9756949f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/c27faa11724229986335c23f4b6d0f1d8d6547fb", - "reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/77e6ede2e01c4cfaade114fe1e07d2f9756949f1", + "reference": "77e6ede2e01c4cfaade114fe1e07d2f9756949f1", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" }, "type": "library", "autoload": { @@ -338,9 +341,9 @@ "homepage": "https://github.com/colinmollenhour/credis", "support": { "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.12.1" + "source": "https://github.com/colinmollenhour/credis/tree/v1.12.2" }, - "time": "2020-11-06T16:09:14+00:00" + "time": "2022-03-08T18:12:43+00:00" }, { "name": "composer/package-versions-deprecated", @@ -1973,22 +1976,22 @@ }, { "name": "utopia-php/cache", - "version": "0.4.2", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "7334c5b182c6ccf66b21ca61808d7c6c899e2bcb" + "reference": "02ffbe165f9632e05519eb75a2ce32deb19638a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/7334c5b182c6ccf66b21ca61808d7c6c899e2bcb", - "reference": "7334c5b182c6ccf66b21ca61808d7c6c899e2bcb", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/02ffbe165f9632e05519eb75a2ce32deb19638a0", + "reference": "02ffbe165f9632e05519eb75a2ce32deb19638a0", "shasum": "" }, "require": { "ext-json": "*", "ext-redis": "*", - "php": ">=7.4" + "php": ">=8.0" }, "require-dev": { "phpunit/phpunit": "^9.3", @@ -2020,9 +2023,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/0.4.2" + "source": "https://github.com/utopia-php/cache/tree/0.5.0" }, - "time": "2021-11-25T16:41:35+00:00" + "time": "2022-03-29T14:44:15+00:00" }, { "name": "utopia-php/cli", @@ -2130,16 +2133,16 @@ }, { "name": "utopia-php/database", - "version": "0.15.4", + "version": "dev-feat-cache-upgrate", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "166365d9c39c4d70b1267af4562f4327e8930f79" + "reference": "7700aab6d22d08f62d666db07495466314e6c8a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/166365d9c39c4d70b1267af4562f4327e8930f79", - "reference": "166365d9c39c4d70b1267af4562f4327e8930f79", + "url": "https://api.github.com/repos/utopia-php/database/zipball/7700aab6d22d08f62d666db07495466314e6c8a9", + "reference": "7700aab6d22d08f62d666db07495466314e6c8a9", "shasum": "" }, "require": { @@ -2148,7 +2151,7 @@ "ext-redis": "*", "mongodb/mongodb": "1.8.0", "php": ">=8.0", - "utopia-php/cache": "0.4.*", + "utopia-php/cache": "0.5.*", "utopia-php/framework": "0.*.*" }, "require-dev": { @@ -2187,9 +2190,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.15.4" + "source": "https://github.com/utopia-php/database/tree/feat-cache-upgrate" }, - "time": "2022-03-15T17:20:14+00:00" + "time": "2022-03-30T17:34:29+00:00" }, { "name": "utopia-php/domains", @@ -4118,16 +4121,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -4162,9 +4165,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", @@ -6324,16 +6327,16 @@ }, { "name": "twig/twig", - "version": "v3.3.8", + "version": "v3.3.9", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c" + "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6ff9b0e440fa66f97f207e181c41340ddfa5683d", + "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d", "shasum": "" }, "require": { @@ -6384,7 +6387,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.8" + "source": "https://github.com/twigphp/Twig/tree/v3.3.9" }, "funding": [ { @@ -6396,7 +6399,7 @@ "type": "tidelift" } ], - "time": "2022-02-04T06:59:48+00:00" + "time": "2022-03-25T09:37:52+00:00" }, { "name": "vimeo/psalm", @@ -6556,9 +6559,18 @@ "time": "2015-12-17T08:42:14+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-feat-cache-upgrate", + "alias": "0.15.1", + "alias_normalized": "0.15.1.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/database": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From eb15be81ddc1c1ca36bd9645954aaa9d41d3e5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 30 Mar 2022 18:07:05 +0000 Subject: [PATCH 44/73] Marked cache as case insensitive --- app/init.php | 2 ++ app/realtime.php | 2 ++ app/tasks/migrate.php | 2 ++ app/tasks/usage.php | 2 ++ src/Appwrite/Resque/Worker.php | 2 ++ 5 files changed, 10 insertions(+) diff --git a/app/init.php b/app/init.php index fd509297f6..7bc553540e 100644 --- a/app/init.php +++ b/app/init.php @@ -135,6 +135,8 @@ const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related const MAX_OUTPUT_CHUNK_SIZE = 2*1024*1024; // 2MB +Cache::setCaseSensitivity(false); + $register = new Registry(); App::setMode(App::getEnv('_APP_ENV', App::MODE_TYPE_PRODUCTION)); diff --git a/app/realtime.php b/app/realtime.php index 8d36069edb..abb2c3b984 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -31,6 +31,8 @@ require_once __DIR__ . '/init.php'; Runtime::enableCoroutine(SWOOLE_HOOK_ALL); +Cache::setCaseSensitivity(false); + $realtime = new Realtime(); /** diff --git a/app/tasks/migrate.php b/app/tasks/migrate.php index ff0705eb32..a3c5e5fc1b 100644 --- a/app/tasks/migrate.php +++ b/app/tasks/migrate.php @@ -12,6 +12,8 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Validator\Text; +Cache::setCaseSensitivity(false); + $cli ->task('migrate') ->param('version', APP_VERSION_STABLE, new Text(8), 'Version to migrate to.', true) diff --git a/app/tasks/usage.php b/app/tasks/usage.php index b659740c14..110caa6a54 100644 --- a/app/tasks/usage.php +++ b/app/tasks/usage.php @@ -11,6 +11,8 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; +Cache::setCaseSensitivity(false); + /** * Metrics We collect * diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index 9682688736..59839cb640 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -16,6 +16,8 @@ use Utopia\Storage\Device\S3; use Exception; +Cache::setCaseSensitivity(false); + abstract class Worker { /** From b06a887d858cb29559d3034f73455c125643fedc Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 2 Apr 2022 16:12:31 +0300 Subject: [PATCH 45/73] feat: update Microsoft OAuth Adapter --- public/scripts/views/forms/oauth-custom.js | 6 +-- src/Appwrite/Auth/OAuth2/Microsoft.php | 44 +++++++++++----------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/public/scripts/views/forms/oauth-custom.js b/public/scripts/views/forms/oauth-custom.js index 323c874411..fd8bd855d0 100644 --- a/public/scripts/views/forms/oauth-custom.js +++ b/public/scripts/views/forms/oauth-custom.js @@ -10,11 +10,11 @@ let providers = { "Microsoft": { "clientSecret": "oauth2MicrosoftClientSecret", - "tenantId": "oauth2MicrosoftTenantId" + "tenantID": "oauth2MicrosoftTenantId" }, "Apple": { - "keyId": "oauth2AppleKeyId", - "teamId": "oauth2AppleTeamId", + "keyID": "oauth2AppleKeyId", + "teamID": "oauth2AppleTeamId", "p8": "oauth2AppleP8" } } diff --git a/src/Appwrite/Auth/OAuth2/Microsoft.php b/src/Appwrite/Auth/OAuth2/Microsoft.php index 417c2ef3d5..ebfd2e4e83 100644 --- a/src/Appwrite/Auth/OAuth2/Microsoft.php +++ b/src/Appwrite/Auth/OAuth2/Microsoft.php @@ -41,7 +41,7 @@ class Microsoft extends OAuth2 */ public function getLoginURL(): string { - return 'https://login.microsoftonline.com/'.$this->getTenantId().'/oauth2/v2.0/authorize?'.\http_build_query([ + return 'https://login.microsoftonline.com/'.$this->getTenantID().'/oauth2/v2.0/authorize?'.\http_build_query([ 'client_id' => $this->appID, 'redirect_uri' => $this->callback, 'state'=> \json_encode($this->state), @@ -62,7 +62,7 @@ class Microsoft extends OAuth2 $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', - 'https://login.microsoftonline.com/' . $this->getTenantId() . '/oauth2/v2.0/token', + 'https://login.microsoftonline.com/' . $this->getTenantID() . '/oauth2/v2.0/token', $headers, \http_build_query([ 'code' => $code, @@ -88,7 +88,7 @@ class Microsoft extends OAuth2 $headers = ['Content-Type: application/x-www-form-urlencoded']; $this->tokens = \json_decode($this->request( 'POST', - 'https://login.microsoftonline.com/' . $this->getTenantId() . '/oauth2/v2.0/token', + 'https://login.microsoftonline.com/' . $this->getTenantID() . '/oauth2/v2.0/token', $headers, \http_build_query([ 'refresh_token' => $refreshToken, @@ -169,38 +169,40 @@ class Microsoft extends OAuth2 return $this->user; } - /** - * Extracts the Client Secret from the JSON stored in appSecret - * @return string - */ - protected function getClientSecret(): string - { - $secret = $this->decodeJson(); - - return (isset($secret['clientSecret'])) ? $secret['clientSecret'] : ''; - } - /** * Decode the JSON stored in appSecret + * * @return array */ - protected function decodeJson(): array + protected function getAppSecret(): array { try { - $secret = \json_decode($this->appSecret, true); + $secret = \json_decode($this->appSecret, true, 512, JSON_THROW_ON_ERROR); } catch (\Throwable $th) { - throw new Exception('Invalid secret'); + throw new \Exception('Invalid secret'); } return $secret; } /** - * Extracts the Tenant Id from the JSON stored in appSecret. Defaults to 'common' as a fallback + * Extracts the Client Secret from the JSON stored in appSecret + * * @return string */ - protected function getTenantId(): string + protected function getClientSecret(): string { - $secret = $this->decodeJson(); - return (isset($secret['tenantId'])) ? $secret['tenantId'] : 'common'; + $secret = $this->getAppSecret(); + return (isset($secret['clientSecret'])) ? $secret['clientSecret'] : ''; + } + + /** + * Extracts the Tenant Id from the JSON stored in appSecret. Defaults to 'common' as a fallback + * + * @return string + */ + protected function getTenantID(): string + { + $secret = $this->getAppSecret(); + return (isset($secret['tenantID'])) ? $secret['tenantID'] : 'common'; } } From aebd0ed8469894b2cdc118f4a481079623edac5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 4 Apr 2022 08:14:14 +0000 Subject: [PATCH 46/73] PR review changes --- .env | 2 +- app/config/variables.php | 11 ++++++++++- app/executor.php | 2 +- app/views/install/compose.phtml | 2 +- docker-compose.yml | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.env b/.env index a6bea88b02..0d7a2e9650 100644 --- a/.env +++ b/.env @@ -53,7 +53,7 @@ _APP_FUNCTIONS_CPUS=0 _APP_FUNCTIONS_MEMORY=0 _APP_FUNCTIONS_MEMORY_SWAP=0 _APP_FUNCTIONS_INACTIVE_THRESHOLD=60 -_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes +OPEN_RUNTIMES_NETWORK=appwrite_runtimes _APP_EXECUTOR_SECRET=your-secret-key _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 diff --git a/app/config/variables.php b/app/config/variables.php index c741cb5486..63321a4a8a 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -599,7 +599,7 @@ return [ ], [ 'name' => '_APP_EXECUTOR_RUNTIME_NETWORK', - 'description' => 'The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.', + 'description' => 'Deprecated with 0.14.0, use \'OPEN_RUNTIMES_NETWORK\' instead!', 'introduction' => '0.13.0', 'default' => 'appwrite_runtimes', 'required' => false, @@ -651,6 +651,15 @@ return [ 'question' => '', 'filter' => '' ], + [ + 'name' => 'OPEN_RUNTIMES_NETWORK', + 'description' => 'The docker network used for communication between the executor and runtimes. Change this if you have altered the default network names.', + 'introduction' => '0.13.0', + 'default' => 'appwrite_runtimes', + 'required' => false, + 'question' => '', + 'filter' => '' + ], ], [ 'category' => 'Maintenance', diff --git a/app/executor.php b/app/executor.php index d28123c224..e9f4c21391 100644 --- a/app/executor.php +++ b/app/executor.php @@ -233,7 +233,7 @@ App::post('/v1/runtimes') throw new Exception('Failed to create build container', 500); } - $orchestration->networkConnect($runtimeId, App::getEnv('_APP_EXECUTOR_RUNTIME_NETWORK', 'appwrite_runtimes')); + $orchestration->networkConnect($runtimeId, App::getEnv('OPEN_RUNTIMES_NETWORK', 'appwrite_runtimes')); /** * Execute any commands if they were provided diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 5740c8680d..221f372330 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -396,7 +396,7 @@ services: - _APP_FUNCTIONS_MEMORY_SWAP - _APP_FUNCTIONS_INACTIVE_THRESHOLD - _APP_EXECUTOR_SECRET - - _APP_EXECUTOR_RUNTIME_NETWORK + - OPEN_RUNTIMES_NETWORK - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_STORAGE_DEVICE diff --git a/docker-compose.yml b/docker-compose.yml index 2ddd5dd51b..154c3b1369 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -454,7 +454,7 @@ services: - _APP_FUNCTIONS_MEMORY_SWAP - _APP_FUNCTIONS_INACTIVE_THRESHOLD - _APP_EXECUTOR_SECRET - - _APP_EXECUTOR_RUNTIME_NETWORK + - OPEN_RUNTIMES_NETWORK - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_STORAGE_DEVICE From 7d2a867b5e15f2f7a9d290497ef25461d09eb7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 4 Apr 2022 11:17:41 +0000 Subject: [PATCH 47/73] Fixed project logo missing --- composer.lock | 53 +++++++++++++++------------- public/dist/scripts/app-all.js | 7 ++-- public/dist/scripts/app.js | 7 ++-- public/scripts/views/forms/upload.js | 8 ++++- 4 files changed, 43 insertions(+), 32 deletions(-) diff --git a/composer.lock b/composer.lock index 4a9b786b33..03d8f468d2 100644 --- a/composer.lock +++ b/composer.lock @@ -300,20 +300,23 @@ }, { "name": "colinmollenhour/credis", - "version": "v1.12.1", + "version": "v1.12.2", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb" + "reference": "77e6ede2e01c4cfaade114fe1e07d2f9756949f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/c27faa11724229986335c23f4b6d0f1d8d6547fb", - "reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/77e6ede2e01c4cfaade114fe1e07d2f9756949f1", + "reference": "77e6ede2e01c4cfaade114fe1e07d2f9756949f1", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" }, "type": "library", "autoload": { @@ -338,9 +341,9 @@ "homepage": "https://github.com/colinmollenhour/credis", "support": { "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.12.1" + "source": "https://github.com/colinmollenhour/credis/tree/v1.12.2" }, - "time": "2020-11-06T16:09:14+00:00" + "time": "2022-03-08T18:12:43+00:00" }, { "name": "composer/package-versions-deprecated", @@ -3491,16 +3494,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -3541,9 +3544,9 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "matthiasmullie/minify", @@ -4118,16 +4121,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -4162,9 +4165,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", @@ -6324,16 +6327,16 @@ }, { "name": "twig/twig", - "version": "v3.3.8", + "version": "v3.3.9", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c" + "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6ff9b0e440fa66f97f207e181c41340ddfa5683d", + "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d", "shasum": "" }, "require": { @@ -6384,7 +6387,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.8" + "source": "https://github.com/twigphp/Twig/tree/v3.3.9" }, "funding": [ { @@ -6396,7 +6399,7 @@ "type": "tidelift" } ], - "time": "2022-02-04T06:59:48+00:00" + "time": "2022-03-25T09:37:52+00:00" }, { "name": "vimeo/psalm", diff --git a/public/dist/scripts/app-all.js b/public/dist/scripts/app-all.js index da85229530..03b14b185e 100644 --- a/public/dist/scripts/app-all.js +++ b/public/dist/scripts/app-all.js @@ -3859,13 +3859,14 @@ tag.className="tag";tag.textContent=value;tag.addEventListener("click",function( if(element.required&&array.length===0){add.setCustomValidity("Please add permissions");}else{add.setCustomValidity("");}};tags.className="tags";preview.className="tags-list";add.type="text";add.className="add";add.placeholder=element.placeholder;tags.addEventListener("click",function(){add.focus();});add.addEventListener("keydown",listen);add.addEventListener("blur",function(event){if(add.value!==''){array.push(add.value);add.value="";element.value=JSON.stringify(array);check();}});tags.appendChild(preview);tags.appendChild(add);element.parentNode.insertBefore(tags,element);element.addEventListener("change",check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-count",controller:function(element){var counter=document.createElement("div");counter.className="counter";element.parentNode.insertBefore(counter,element.nextSibling);var count=function(){if(0<=element.maxLength){counter.innerText=(element.maxLength-element.value.length).toString()+" / "+ element.maxLength;}else{var words=element.value!==""?element.value.trim().split(" ").length:0;counter.innerText=words+" words and "+element.value.length.toString()+" chars";}};element.addEventListener("keyup",count);element.addEventListener("change",count);element.addEventListener("cut",count);element.addEventListener("paste",count);element.addEventListener("drop",count);count();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-direction",controller:function(element,rtl){var setDirection=function(){var value=element.value[0]?element.value:"";var direction="ltr";var align="left";if(rtl.isRTL(value)){direction="rtl";align="right";} element.style.direction=direction;element.style.textAlign=align;};element.addEventListener("keyup",setDirection);element.addEventListener("change",setDirection);element.addEventListener("cut",setDirection);element.addEventListener("paste",setDirection);element.addEventListener("drop",setDirection);setDirection();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-resize",controller:function(element,window){function resize(){var scrollLeft=window.pageXOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollLeft;var scrollTop=window.pageYOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollTop;var offset=element.offsetHeight-element.clientHeight;element.style.height="auto";element.style.height=element.scrollHeight+offset+"px";window.scrollTo(scrollLeft,scrollTop);} -element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){preview.innerHTML="";count.innerHTML="0 / "+max;if(!result){return;} +element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;console.log(element);var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){try{result=JSON.parse(result);}catch(err){} +preview.innerHTML="";count.innerHTML="0 / "+max;if(!result){return;} var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/buckets/"+ result.bucketId+"/files/"+ result.fileId+"/preview?width="+ previewWidth+"&height="+ -previewHeight+"&project="+project+"&mode=admin";image.alt=previewAlt;file.className="file avatar";file.tabIndex=0;file.appendChild(image);preview.appendChild(file);var remove=(function(result){return function(event){render(result.$id);element.value='';};})(result);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=result;};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));sdk.storage.createFile('default','unique()',files[0],read,write).then(function(response){onComplete(message);render({bucketId:response.bucketId,fileId:response.$id});},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} -render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} +previewHeight+"&project="+project+"&mode=admin";image.alt=previewAlt;file.className="file avatar";file.tabIndex=0;file.appendChild(image);preview.appendChild(file);var remove=(function(result){return function(event){render(result.$id);element.value='';};})(result);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=JSON.stringify(result);};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));sdk.storage.createFile('default','unique()',files[0],read,write).then(function(response){onComplete(message);render({bucketId:response.bucketId,fileId:response.$id});},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} +render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);console.log(output);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} window.getSelection().removeAllRanges();};button.addEventListener("click",copy);}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-page-title",repeat:true,controller:function(element,document,expression){document.title=expression.parse(element.getAttribute("data-page-title"))||document.title;}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-to',repeat:false,controller:function(element,window){let button=window.document.createElement('button');button.className='scroll-to icon-up-dir';button.alt='Back To Top';button.title='Back To Top';button.addEventListener('click',function(){element.scrollIntoView(true,{behavior:'smooth'});button.blur();},false);element.appendChild(button);}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-direction',repeat:false,controller:function(element,window){let position=0;let check=function(){let direction=window.document.documentElement.scrollTop;if(direction>position){element.classList.remove('scroll-to-top') element.classList.add('scroll-to-bottom')} else{element.classList.remove('scroll-to-bottom') diff --git a/public/dist/scripts/app.js b/public/dist/scripts/app.js index 0accf79a6a..9ae4d12e64 100644 --- a/public/dist/scripts/app.js +++ b/public/dist/scripts/app.js @@ -809,13 +809,14 @@ tag.className="tag";tag.textContent=value;tag.addEventListener("click",function( if(element.required&&array.length===0){add.setCustomValidity("Please add permissions");}else{add.setCustomValidity("");}};tags.className="tags";preview.className="tags-list";add.type="text";add.className="add";add.placeholder=element.placeholder;tags.addEventListener("click",function(){add.focus();});add.addEventListener("keydown",listen);add.addEventListener("blur",function(event){if(add.value!==''){array.push(add.value);add.value="";element.value=JSON.stringify(array);check();}});tags.appendChild(preview);tags.appendChild(add);element.parentNode.insertBefore(tags,element);element.addEventListener("change",check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-count",controller:function(element){var counter=document.createElement("div");counter.className="counter";element.parentNode.insertBefore(counter,element.nextSibling);var count=function(){if(0<=element.maxLength){counter.innerText=(element.maxLength-element.value.length).toString()+" / "+ element.maxLength;}else{var words=element.value!==""?element.value.trim().split(" ").length:0;counter.innerText=words+" words and "+element.value.length.toString()+" chars";}};element.addEventListener("keyup",count);element.addEventListener("change",count);element.addEventListener("cut",count);element.addEventListener("paste",count);element.addEventListener("drop",count);count();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-direction",controller:function(element,rtl){var setDirection=function(){var value=element.value[0]?element.value:"";var direction="ltr";var align="left";if(rtl.isRTL(value)){direction="rtl";align="right";} element.style.direction=direction;element.style.textAlign=align;};element.addEventListener("keyup",setDirection);element.addEventListener("change",setDirection);element.addEventListener("cut",setDirection);element.addEventListener("paste",setDirection);element.addEventListener("drop",setDirection);setDirection();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-resize",controller:function(element,window){function resize(){var scrollLeft=window.pageXOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollLeft;var scrollTop=window.pageYOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollTop;var offset=element.offsetHeight-element.clientHeight;element.style.height="auto";element.style.height=element.scrollHeight+offset+"px";window.scrollTo(scrollLeft,scrollTop);} -element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){preview.innerHTML="";count.innerHTML="0 / "+max;if(!result){return;} +element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;console.log(element);var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){try{result=JSON.parse(result);}catch(err){} +preview.innerHTML="";count.innerHTML="0 / "+max;if(!result){return;} var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/buckets/"+ result.bucketId+"/files/"+ result.fileId+"/preview?width="+ previewWidth+"&height="+ -previewHeight+"&project="+project+"&mode=admin";image.alt=previewAlt;file.className="file avatar";file.tabIndex=0;file.appendChild(image);preview.appendChild(file);var remove=(function(result){return function(event){render(result.$id);element.value='';};})(result);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=result;};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));sdk.storage.createFile('default','unique()',files[0],read,write).then(function(response){onComplete(message);render({bucketId:response.bucketId,fileId:response.$id});},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} -render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} +previewHeight+"&project="+project+"&mode=admin";image.alt=previewAlt;file.className="file avatar";file.tabIndex=0;file.appendChild(image);preview.appendChild(file);var remove=(function(result){return function(event){render(result.$id);element.value='';};})(result);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=JSON.stringify(result);};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));sdk.storage.createFile('default','unique()',files[0],read,write).then(function(response){onComplete(message);render({bucketId:response.bucketId,fileId:response.$id});},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} +render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);console.log(output);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} window.getSelection().removeAllRanges();};button.addEventListener("click",copy);}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-page-title",repeat:true,controller:function(element,document,expression){document.title=expression.parse(element.getAttribute("data-page-title"))||document.title;}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-to',repeat:false,controller:function(element,window){let button=window.document.createElement('button');button.className='scroll-to icon-up-dir';button.alt='Back To Top';button.title='Back To Top';button.addEventListener('click',function(){element.scrollIntoView(true,{behavior:'smooth'});button.blur();},false);element.appendChild(button);}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-direction',repeat:false,controller:function(element,window){let position=0;let check=function(){let direction=window.document.documentElement.scrollTop;if(direction>position){element.classList.remove('scroll-to-top') element.classList.add('scroll-to-bottom')} else{element.classList.remove('scroll-to-bottom') diff --git a/public/scripts/views/forms/upload.js b/public/scripts/views/forms/upload.js index e99d16fd23..3d25831b19 100644 --- a/public/scripts/views/forms/upload.js +++ b/public/scripts/views/forms/upload.js @@ -55,6 +55,12 @@ }; var render = function(result) { + try { + result = JSON.parse(result); + } catch(err) { + // Not JSON = empty string. No image + + } preview.innerHTML = ""; count.innerHTML = "0 / " + max; @@ -97,7 +103,7 @@ file.addEventListener("click", remove); file.addEventListener("keypress", remove); - element.value = result; + element.value = JSON.stringify(result); }; input.addEventListener("change", function() { From e503756bf98b50c1ca1061dfe6dec49a6e9e74cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 4 Apr 2022 13:55:26 +0000 Subject: [PATCH 48/73] Upgraded to new versions --- app/init.php | 2 -- app/realtime.php | 2 -- app/tasks/migrate.php | 2 -- app/tasks/usage.php | 2 -- composer.json | 4 ++-- src/Appwrite/Resque/Worker.php | 2 -- 6 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/init.php b/app/init.php index 7bc553540e..fd509297f6 100644 --- a/app/init.php +++ b/app/init.php @@ -135,8 +135,6 @@ const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related const MAX_OUTPUT_CHUNK_SIZE = 2*1024*1024; // 2MB -Cache::setCaseSensitivity(false); - $register = new Registry(); App::setMode(App::getEnv('_APP_ENV', App::MODE_TYPE_PRODUCTION)); diff --git a/app/realtime.php b/app/realtime.php index abb2c3b984..8d36069edb 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -31,8 +31,6 @@ require_once __DIR__ . '/init.php'; Runtime::enableCoroutine(SWOOLE_HOOK_ALL); -Cache::setCaseSensitivity(false); - $realtime = new Realtime(); /** diff --git a/app/tasks/migrate.php b/app/tasks/migrate.php index a3c5e5fc1b..ff0705eb32 100644 --- a/app/tasks/migrate.php +++ b/app/tasks/migrate.php @@ -12,8 +12,6 @@ use Utopia\Database\Database; use Utopia\Database\Validator\Authorization; use Utopia\Validator\Text; -Cache::setCaseSensitivity(false); - $cli ->task('migrate') ->param('version', APP_VERSION_STABLE, new Text(8), 'Version to migrate to.', true) diff --git a/app/tasks/usage.php b/app/tasks/usage.php index 110caa6a54..b659740c14 100644 --- a/app/tasks/usage.php +++ b/app/tasks/usage.php @@ -11,8 +11,6 @@ use Utopia\Database\Database; use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; -Cache::setCaseSensitivity(false); - /** * Metrics We collect * diff --git a/composer.json b/composer.json index 821f9a239c..59d4a70fd4 100644 --- a/composer.json +++ b/composer.json @@ -42,10 +42,10 @@ "utopia-php/abuse": "0.7.*", "utopia-php/analytics": "0.2.*", "utopia-php/audit": "0.8.*", - "utopia-php/cache": "0.5.*", + "utopia-php/cache": "0.6.*", "utopia-php/cli": "0.12.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "dev-feat-cache-upgrate as 0.15.1", + "utopia-php/database": "0.15.*", "utopia-php/locale": "0.4.*", "utopia-php/registry": "0.5.*", "utopia-php/preloader": "0.2.*", diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index 59839cb640..9682688736 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -16,8 +16,6 @@ use Utopia\Storage\Device\S3; use Exception; -Cache::setCaseSensitivity(false); - abstract class Worker { /** From 0a3816044eda013d6b260c67d31db66b716ff2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 4 Apr 2022 13:56:01 +0000 Subject: [PATCH 49/73] Updated lockfile --- composer.lock | 89 +++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 49 deletions(-) diff --git a/composer.lock b/composer.lock index 79c79e9d23..2e382f1908 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "620799bd853e7891fbd5484a09d70dff", + "content-hash": "c23ee95a9a573b123ec587734023132e", "packages": [ { "name": "adhocore/jwt", @@ -1976,16 +1976,16 @@ }, { "name": "utopia-php/cache", - "version": "0.5.0", + "version": "0.6.0", "source": { "type": "git", "url": "https://github.com/utopia-php/cache.git", - "reference": "02ffbe165f9632e05519eb75a2ce32deb19638a0" + "reference": "8ea1353a4bbab617e23c865a7c97b60d8074aee3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/cache/zipball/02ffbe165f9632e05519eb75a2ce32deb19638a0", - "reference": "02ffbe165f9632e05519eb75a2ce32deb19638a0", + "url": "https://api.github.com/repos/utopia-php/cache/zipball/8ea1353a4bbab617e23c865a7c97b60d8074aee3", + "reference": "8ea1353a4bbab617e23c865a7c97b60d8074aee3", "shasum": "" }, "require": { @@ -2023,9 +2023,9 @@ ], "support": { "issues": "https://github.com/utopia-php/cache/issues", - "source": "https://github.com/utopia-php/cache/tree/0.5.0" + "source": "https://github.com/utopia-php/cache/tree/0.6.0" }, - "time": "2022-03-29T14:44:15+00:00" + "time": "2022-04-04T12:30:05+00:00" }, { "name": "utopia-php/cli", @@ -2133,16 +2133,16 @@ }, { "name": "utopia-php/database", - "version": "dev-feat-cache-upgrate", + "version": "0.15.5", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "7700aab6d22d08f62d666db07495466314e6c8a9" + "reference": "6507b58ef3e22703b9df68d3dbd5e822d5bb023f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/7700aab6d22d08f62d666db07495466314e6c8a9", - "reference": "7700aab6d22d08f62d666db07495466314e6c8a9", + "url": "https://api.github.com/repos/utopia-php/database/zipball/6507b58ef3e22703b9df68d3dbd5e822d5bb023f", + "reference": "6507b58ef3e22703b9df68d3dbd5e822d5bb023f", "shasum": "" }, "require": { @@ -2151,7 +2151,7 @@ "ext-redis": "*", "mongodb/mongodb": "1.8.0", "php": ">=8.0", - "utopia-php/cache": "0.5.*", + "utopia-php/cache": "0.6.*", "utopia-php/framework": "0.*.*" }, "require-dev": { @@ -2190,9 +2190,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/feat-cache-upgrate" + "source": "https://github.com/utopia-php/database/tree/0.15.5" }, - "time": "2022-03-30T17:34:29+00:00" + "time": "2022-04-04T13:42:00+00:00" }, { "name": "utopia-php/domains", @@ -3195,16 +3195,16 @@ }, { "name": "composer/semver", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/5d8e574bb0e69188786b8ef77d43341222a41a71", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { @@ -3256,7 +3256,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.1" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -3272,7 +3272,7 @@ "type": "tidelift" } ], - "time": "2022-03-16T11:22:07+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", @@ -3494,16 +3494,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -3544,9 +3544,9 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "matthiasmullie/minify", @@ -5076,16 +5076,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { @@ -5127,7 +5127,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -5135,7 +5135,7 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", @@ -5718,16 +5718,16 @@ }, { "name": "symfony/console", - "version": "v6.0.5", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1" + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3bebf4108b9e07492a2a4057d207aa5a77d146b1", - "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1", + "url": "https://api.github.com/repos/symfony/console/zipball/70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", "shasum": "" }, "require": { @@ -5793,7 +5793,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.5" + "source": "https://github.com/symfony/console/tree/v6.0.7" }, "funding": [ { @@ -5809,7 +5809,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T10:48:52+00:00" + "time": "2022-03-31T17:18:25+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6559,18 +6559,9 @@ "time": "2015-12-17T08:42:14+00:00" } ], - "aliases": [ - { - "package": "utopia-php/database", - "version": "dev-feat-cache-upgrate", - "alias": "0.15.1", - "alias_normalized": "0.15.1.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/database": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 14642fe48fd13186c0782d5fb83500611b922a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ShaoBo=20Wan=28=E7=84=A1=E5=B0=98=29?= <756684177@qq.com> Date: Wed, 6 Apr 2022 10:06:57 +0800 Subject: [PATCH 50/73] Update README-CN.md --- README-CN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README-CN.md b/README-CN.md index 92b19d33cc..cc8457fd55 100644 --- a/README-CN.md +++ b/README-CN.md @@ -20,7 +20,7 @@ Appwrite是一个基于Docker的端到端开发者平台,其容器化的微服务库可应用于网页端,移动端,以及后端。Appwrite 通过视觉化界面极简了从零编写 API 的繁琐过程,在保证软件安全的前提下为开发者创造了一个高效的开发环境。 -Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存, 图像处理,云函数计算,[等多种服务](https://appwrite.io/docs). +Appwrite 可以提供给开发者用户验证,外部授权,用户数据读写检索,文件储存,图像处理,云函数计算,[等多种服务](https://appwrite.io/docs). ![Appwrite](public/images/github.png) @@ -168,4 +168,4 @@ Appwrite API 界面层利用后台缓存和任务委派来提供极速的响应 ## 版权说明 -版权详情,访问 [BSD 3-Clause License](./LICENSE)。 \ No newline at end of file +版权详情,访问 [BSD 3-Clause License](./LICENSE)。 From 2ef2fa2d5fe9fb02e5b33cb422e50541e65777eb Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 10 Apr 2022 12:57:00 +0545 Subject: [PATCH 51/73] warning to top --- docker-compose.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3521b64bac..c63b9c80e7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,14 @@ +# WARNING! +# This is a development version of THE Appwrite docker-compose.yml file. +# Avoid using this file in your production environment. +# We're exposing here sensitive ports and mounting code volumes for rapid development and debugging of the server stack. + x-logging: &x-logging logging: driver: 'json-file' options: max-file: 5 max-size: 10m -# WARNING! -# This is a development version of THE Appwrite docker-compose.yml file. -# Avoid using this file in your production environment. -# We're exposing here sensitive ports and mounting code volumes for rapid development and debugging of the server stack. version: '3' From d8da25f12ac03a6b8c03e980e97a6bc772b18c19 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 10 Apr 2022 11:01:10 +0000 Subject: [PATCH 52/73] update framework to dev branch --- composer.json | 2 +- composer.lock | 140 +++++++++++++++++++++++++++----------------------- 2 files changed, 77 insertions(+), 65 deletions(-) diff --git a/composer.json b/composer.json index b49224ba05..0832fe34e7 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "ext-sockets": "*", "appwrite/php-clamav": "1.1.*", "appwrite/php-runtimes": "0.7.*", - "utopia-php/framework": "0.19.*", + "utopia-php/framework": "dev-feat-head-request as 0.19.7", "utopia-php/logger": "0.3.*", "utopia-php/abuse": "0.7.*", "utopia-php/analytics": "0.2.*", diff --git a/composer.lock b/composer.lock index 4a9b786b33..1be63418dd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3ef20ad6919a1844f207e06719ad8929", + "content-hash": "a64f667653496a663e8980b7788286d4", "packages": [ { "name": "adhocore/jwt", @@ -300,20 +300,23 @@ }, { "name": "colinmollenhour/credis", - "version": "v1.12.1", + "version": "v1.13.0", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb" + "reference": "afec8e58ec93d2291c127fa19709a048f28641e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/c27faa11724229986335c23f4b6d0f1d8d6547fb", - "reference": "c27faa11724229986335c23f4b6d0f1d8d6547fb", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/afec8e58ec93d2291c127fa19709a048f28641e5", + "reference": "afec8e58ec93d2291c127fa19709a048f28641e5", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=5.6.0" + }, + "suggest": { + "ext-redis": "Improved performance for communicating with redis" }, "type": "library", "autoload": { @@ -338,9 +341,9 @@ "homepage": "https://github.com/colinmollenhour/credis", "support": { "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.12.1" + "source": "https://github.com/colinmollenhour/credis/tree/v1.13.0" }, - "time": "2020-11-06T16:09:14+00:00" + "time": "2022-04-07T14:57:22+00:00" }, { "name": "composer/package-versions-deprecated", @@ -1580,16 +1583,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { @@ -1627,7 +1630,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" }, "funding": [ { @@ -1643,7 +1646,7 @@ "type": "tidelift" } ], - "time": "2021-11-01T23:48:49+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2247,16 +2250,16 @@ }, { "name": "utopia-php/framework", - "version": "0.19.7", + "version": "dev-feat-head-request", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "f17afe77a21873b9be18ebc05283813468b4283a" + "reference": "4df161cef013267c3a8ecc2574179e8184988d4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/f17afe77a21873b9be18ebc05283813468b4283a", - "reference": "f17afe77a21873b9be18ebc05283813468b4283a", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/4df161cef013267c3a8ecc2574179e8184988d4b", + "reference": "4df161cef013267c3a8ecc2574179e8184988d4b", "shasum": "" }, "require": { @@ -2290,9 +2293,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.19.7" + "source": "https://github.com/utopia-php/framework/tree/feat-head-request" }, - "time": "2022-02-18T00:04:49+00:00" + "time": "2022-04-10T10:50:05+00:00" }, { "name": "utopia-php/image", @@ -3192,16 +3195,16 @@ }, { "name": "composer/semver", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/5d8e574bb0e69188786b8ef77d43341222a41a71", - "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { @@ -3253,7 +3256,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.1" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -3269,7 +3272,7 @@ "type": "tidelift" } ], - "time": "2022-03-16T11:22:07+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", @@ -3491,16 +3494,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -3541,9 +3544,9 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "matthiasmullie/minify", @@ -4118,16 +4121,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -4162,9 +4165,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", @@ -5073,16 +5076,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { @@ -5124,7 +5127,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -5132,7 +5135,7 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", @@ -5715,16 +5718,16 @@ }, { "name": "symfony/console", - "version": "v6.0.5", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1" + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3bebf4108b9e07492a2a4057d207aa5a77d146b1", - "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1", + "url": "https://api.github.com/repos/symfony/console/zipball/70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", "shasum": "" }, "require": { @@ -5790,7 +5793,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.5" + "source": "https://github.com/symfony/console/tree/v6.0.7" }, "funding": [ { @@ -5806,7 +5809,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T10:48:52+00:00" + "time": "2022-03-31T17:18:25+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6058,16 +6061,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603" + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/36715ebf9fb9db73db0cb24263c79077c6fe8603", - "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c", + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c", "shasum": "" }, "require": { @@ -6120,7 +6123,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.1" }, "funding": [ { @@ -6136,7 +6139,7 @@ "type": "tidelift" } ], - "time": "2021-11-04T17:53:12+00:00" + "time": "2022-03-13T20:10:05+00:00" }, { "name": "symfony/string", @@ -6324,16 +6327,16 @@ }, { "name": "twig/twig", - "version": "v3.3.8", + "version": "v3.3.10", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c" + "reference": "8442df056c51b706793adf80a9fd363406dd3674" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/8442df056c51b706793adf80a9fd363406dd3674", + "reference": "8442df056c51b706793adf80a9fd363406dd3674", "shasum": "" }, "require": { @@ -6384,7 +6387,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.8" + "source": "https://github.com/twigphp/Twig/tree/v3.3.10" }, "funding": [ { @@ -6396,7 +6399,7 @@ "type": "tidelift" } ], - "time": "2022-02-04T06:59:48+00:00" + "time": "2022-04-06T06:47:41+00:00" }, { "name": "vimeo/psalm", @@ -6556,9 +6559,18 @@ "time": "2015-12-17T08:42:14+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/framework", + "version": "dev-feat-head-request", + "alias": "0.19.7", + "alias_normalized": "0.19.7.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/framework": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From ade4024593d9660c72f5add23a1e508e9f1b5193 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 11 Apr 2022 20:37:07 +0200 Subject: [PATCH 53/73] Added configurable host for Executor service: * Add `_APP_EXECUTOR_HOST` env variable. * Use `_APP_EXECUTOR_HOST` (or fallback to default) as host value to Executor service. --- .env | 1 + Dockerfile | 1 + app/config/variables.php | 9 +++++++++ app/controllers/api/functions.php | 2 +- app/views/install/compose.phtml | 4 ++++ app/workers/builds.php | 2 +- app/workers/deletes.php | 4 ++-- app/workers/functions.php | 2 +- docker-compose.yml | 4 ++++ src/Executor/Executor.php | 15 +++++++++++---- tests/resources/docker/docker-compose.yml | 4 ++++ 11 files changed, 39 insertions(+), 9 deletions(-) diff --git a/.env b/.env index 92b13e20ce..dac72357ba 100644 --- a/.env +++ b/.env @@ -56,6 +56,7 @@ _APP_FUNCTIONS_MEMORY_SWAP=0 _APP_FUNCTIONS_INACTIVE_THRESHOLD=60 OPEN_RUNTIMES_NETWORK=appwrite_runtimes _APP_EXECUTOR_SECRET=your-secret-key +_APP_EXECUTOR_HOST= _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 _APP_MAINTENANCE_RETENTION_ABUSE=86400 diff --git a/Dockerfile b/Dockerfile index 023e88a205..cb9f4e0c14 100755 --- a/Dockerfile +++ b/Dockerfile @@ -185,6 +185,7 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_MEMORY=128 \ _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_EXECUTOR_SECRET=a-random-secret \ + _APP_EXECUTOR_HOST= \ _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ diff --git a/app/config/variables.php b/app/config/variables.php index 6067622454..2bed472758 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -597,6 +597,15 @@ return [ 'question' => '', 'filter' => '' ], + [ + 'name' => '_APP_EXECUTOR_HOST', + 'description' => 'The host used by Appwrite to communicate with the function executor!', + 'introduction' => '0.13.0', + 'default' => 'http://appwrite-executor/v1', + 'required' => false, + 'question' => '', + 'filter' => '' + ], [ 'name' => '_APP_EXECUTOR_RUNTIME_NETWORK', 'description' => 'Deprecated with 0.14.0, use \'OPEN_RUNTIMES_NETWORK\' instead!', diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index d491b7d75b..6c2cf53290 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -938,7 +938,7 @@ App::post('/v1/functions/:functionId/executions') ]); /** Execute function */ - $executor = new Executor(); + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); $executionResponse = []; try { $executionResponse = $executor->createExecution( diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 3ae1c2654f..4c3406ffed 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -128,6 +128,7 @@ services: - _APP_FUNCTIONS_MEMORY_SWAP - _APP_FUNCTIONS_RUNTIMES - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_STATSD_HOST @@ -268,6 +269,7 @@ services: - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST appwrite-worker-database: image: /: @@ -310,6 +312,7 @@ services: - _APP_ENV - _APP_OPENSSL_KEY_V1 - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER @@ -379,6 +382,7 @@ services: - _APP_DB_PASS - _APP_FUNCTIONS_TIMEOUT - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST - _APP_USAGE_STATS - DOCKERHUB_PULL_USERNAME - DOCKERHUB_PULL_PASSWORD diff --git a/app/workers/builds.php b/app/workers/builds.php index a81ccd9112..a2665d0683 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -33,7 +33,7 @@ class BuildsV1 extends Worker } public function init(): void { - $this->executor = new Executor(); + $this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); } public function run(): void diff --git a/app/workers/deletes.php b/app/workers/deletes.php index 963488a00a..d8aaf26e5a 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -368,7 +368,7 @@ class DeletesV1 extends Worker * Request executor to delete all deployment containers */ Console::info("Requesting executor to delete all deployment containers for function " . $functionId); - $executor = new Executor(); + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); foreach ($deploymentIds as $deploymentId) { try { $executor->deleteRuntime($projectId, $deploymentId); @@ -420,7 +420,7 @@ class DeletesV1 extends Worker */ Console::info("Requesting executor to delete deployment container for deployment " . $deploymentId); try { - $executor = new Executor(); + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); $executor->deleteRuntime($projectId, $deploymentId); } catch (Throwable $th) { Console::error($th->getMessage()); diff --git a/app/workers/functions.php b/app/workers/functions.php index 2d4cdb2e54..9bccc43a66 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -37,7 +37,7 @@ class FunctionsV1 extends Worker public function init(): void { - $this->executor = new Executor(); + $this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); } public function run(): void diff --git a/docker-compose.yml b/docker-compose.yml index 1ed63bd6f3..9d3a28aeb7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -150,6 +150,7 @@ services: - _APP_FUNCTIONS_MEMORY_SWAP - _APP_FUNCTIONS_RUNTIMES - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_STATSD_HOST @@ -306,6 +307,7 @@ services: - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST appwrite-worker-database: entrypoint: worker-database @@ -355,6 +357,7 @@ services: - _APP_ENV - _APP_OPENSSL_KEY_V1 - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST - _APP_REDIS_HOST - _APP_REDIS_PORT - _APP_REDIS_USER @@ -429,6 +432,7 @@ services: - _APP_DB_PASS - _APP_FUNCTIONS_TIMEOUT - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST - _APP_USAGE_STATS - DOCKERHUB_PULL_USERNAME - DOCKERHUB_PULL_PASSWORD diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index fff322161f..bebba919c4 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -6,7 +6,7 @@ use Exception; use Utopia\App; use Utopia\CLI\Console; -class Executor +class Executor { const METHOD_GET = 'GET'; const METHOD_POST = 'POST'; @@ -18,6 +18,8 @@ class Executor const METHOD_CONNECT = 'CONNECT'; const METHOD_TRACE = 'TRACE'; + const DEFAULT_HOST = 'http://appwrite-executor/v1'; + private $endpoint; private $selfSigned = false; @@ -26,9 +28,14 @@ class Executor 'content-type' => '', ]; - public function __construct(string $endpoint = 'http://appwrite-executor/v1') - { - $this->endpoint = $endpoint; + public function __construct(string $endpoint = self::DEFAULT_HOST) + { + if (empty($endpoint)) { + Console::warning('Undefined Executor host (fallback to ' . self::DEFAULT_HOST . ')'); + $this->endpoint = self::DEFAULT_HOST; + } else { + $this->endpoint = $endpoint; + } } /** diff --git a/tests/resources/docker/docker-compose.yml b/tests/resources/docker/docker-compose.yml index 3955573723..e7bbaf2705 100644 --- a/tests/resources/docker/docker-compose.yml +++ b/tests/resources/docker/docker-compose.yml @@ -88,6 +88,7 @@ services: - _APP_FUNCTIONS_CPUS - _APP_FUNCTIONS_MEMORY - _APP_FUNCTIONS_MEMORY_SWAP + - _APP_EXECUTOR_HOST appwrite-worker-usage: entrypoint: worker-usage @@ -193,6 +194,7 @@ services: - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_EXECUTOR_HOST appwrite-worker-certificates: entrypoint: worker-certificates @@ -247,6 +249,7 @@ services: - _APP_FUNCTIONS_CPUS - _APP_FUNCTIONS_MEMORY - _APP_FUNCTIONS_MEMORY_SWAP + - _APP_EXECUTOR_HOST appwrite-worker-mails: entrypoint: worker-mails @@ -294,6 +297,7 @@ services: - _APP_LOGGING_PROVIDER - _APP_LOGGING_CONFIG - _APP_EXECUTOR_SECRET + - _APP_EXECUTOR_HOST appwrite-schedule: entrypoint: schedule From bc733157f49ebe94397ad1297bf6b97a1ebdb429 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 12 Apr 2022 00:30:39 +0000 Subject: [PATCH 54/73] use framework from tag --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0832fe34e7..b49224ba05 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "ext-sockets": "*", "appwrite/php-clamav": "1.1.*", "appwrite/php-runtimes": "0.7.*", - "utopia-php/framework": "dev-feat-head-request as 0.19.7", + "utopia-php/framework": "0.19.*", "utopia-php/logger": "0.3.*", "utopia-php/abuse": "0.7.*", "utopia-php/analytics": "0.2.*", From 5558d1949f5737f83f3abd1015ebca711959a151 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 12 Apr 2022 02:03:28 +0000 Subject: [PATCH 55/73] prep for flutter,dart release --- app/config/platforms.php | 4 ++-- composer.json | 2 +- composer.lock | 15 ++++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 6649723a0c..164b2c0b60 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -63,7 +63,7 @@ return [ [ 'key' => 'flutter', 'name' => 'Flutter', - 'version' => '4.0.1', + 'version' => '4.0.2', 'url' => 'https://github.com/appwrite/sdk-for-flutter', 'package' => 'https://pub.dev/packages/appwrite', 'enabled' => true, @@ -352,7 +352,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '4.0.1', + 'version' => '4.0.2', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, diff --git a/composer.json b/composer.json index 59d4a70fd4..730621ca17 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,7 @@ } ], "require-dev": { - "appwrite/sdk-generator": "0.18.1", + "appwrite/sdk-generator": "0.18.2", "phpunit/phpunit": "9.5.10", "swoole/ide-helper": "4.8.5", "textalk/websocket": "1.5.5", diff --git a/composer.lock b/composer.lock index 9f7faf8407..866dec5cec 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c23ee95a9a573b123ec587734023132e", + "content-hash": "bca03b1d0b7dd312bc174e0a2973b015", "packages": [ { "name": "adhocore/jwt", @@ -3075,16 +3075,16 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.18.1", + "version": "0.18.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "1d5293dd65e014f2067f2bfc9c0c45e5b0de56aa" + "reference": "9381507c1526da1c099eb2297e68374dec4e3793" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/1d5293dd65e014f2067f2bfc9c0c45e5b0de56aa", - "reference": "1d5293dd65e014f2067f2bfc9c0c45e5b0de56aa", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/9381507c1526da1c099eb2297e68374dec4e3793", + "reference": "9381507c1526da1c099eb2297e68374dec4e3793", "shasum": "" }, "require": { @@ -3096,6 +3096,7 @@ "twig/twig": "^3.3" }, "require-dev": { + "brianium/paratest": "^6.4", "phpunit/phpunit": "^9.5.13" }, "type": "library", @@ -3118,9 +3119,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.18.1" + "source": "https://github.com/appwrite/sdk-generator/tree/0.18.2" }, - "time": "2022-03-03T09:45:38+00:00" + "time": "2022-04-10T09:03:18+00:00" }, { "name": "composer/pcre", From f2de7d46f5d4074b488e3c1108b61e9fc68cc7b2 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 12 Apr 2022 02:10:13 +0000 Subject: [PATCH 56/73] update changelog --- docs/sdks/dart/CHANGELOG.md | 3 +++ docs/sdks/flutter/CHANGELOG.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md index 65793a8f44..77b54fa608 100644 --- a/docs/sdks/dart/CHANGELOG.md +++ b/docs/sdks/dart/CHANGELOG.md @@ -1,3 +1,6 @@ +## 4.0.2 +* Fix null issues with float attributes (https://github.com/appwrite/sdk-for-dart/issues/17 and https://github.com/appwrite/sdk-for-dart/issues/16) + ## 4.0.1 * Fix InputFile filename param * Fix examples diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md index 1fba948022..515e15f78f 100644 --- a/docs/sdks/flutter/CHANGELOG.md +++ b/docs/sdks/flutter/CHANGELOG.md @@ -1,3 +1,6 @@ +## 4.0.2 +* Upgrade dependencies + ## 4.0.1 * Fix InputFile filename param * Fix examples From 6a9bd2710c6c136656b3546010220b843c4a78b9 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 12 Apr 2022 02:18:19 +0000 Subject: [PATCH 57/73] update swift, apple and android sdk versions --- app/config/platforms.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 164b2c0b60..85c2111135 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -81,7 +81,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '0.3.0', + 'version' => '0.3.1', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '0.4.0', + 'version' => '0.4.1', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -392,7 +392,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '0.3.0', + 'version' => '0.3.1', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, From 123d93d40d48c3566eaeeebcc6c42900ee6a33ee Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Tue, 12 Apr 2022 11:20:53 +0545 Subject: [PATCH 58/73] updated examples --- .../examples/account/create-anonymous-session.md | 14 ++++---------- .../examples/account/create-j-w-t.md | 14 ++++---------- .../account/create-magic-u-r-l-session.md | 16 +++++----------- .../examples/account/create-o-auth2session.md | 16 +++++----------- .../examples/account/create-recovery.md | 16 +++++----------- .../examples/account/create-session.md | 16 +++++----------- .../examples/account/create-verification.md | 16 +++++----------- .../client-apple/examples/account/create.md | 16 +++++----------- .../examples/account/delete-session.md | 16 +++++----------- .../examples/account/delete-sessions.md | 14 ++++---------- .../client-apple/examples/account/delete.md | 14 ++++---------- .../client-apple/examples/account/get-logs.md | 14 ++++---------- .../client-apple/examples/account/get-prefs.md | 14 ++++---------- .../client-apple/examples/account/get-session.md | 16 +++++----------- .../examples/account/get-sessions.md | 14 ++++---------- .../0.13.x/client-apple/examples/account/get.md | 14 ++++---------- .../examples/account/update-email.md | 16 +++++----------- .../account/update-magic-u-r-l-session.md | 16 +++++----------- .../client-apple/examples/account/update-name.md | 16 +++++----------- .../examples/account/update-password.md | 16 +++++----------- .../examples/account/update-prefs.md | 16 +++++----------- .../examples/account/update-recovery.md | 16 +++++----------- .../examples/account/update-session.md | 16 +++++----------- .../examples/account/update-verification.md | 16 +++++----------- .../client-apple/examples/avatars/get-browser.md | 16 +++++----------- .../examples/avatars/get-credit-card.md | 16 +++++----------- .../client-apple/examples/avatars/get-favicon.md | 16 +++++----------- .../client-apple/examples/avatars/get-flag.md | 16 +++++----------- .../client-apple/examples/avatars/get-image.md | 16 +++++----------- .../examples/avatars/get-initials.md | 14 ++++---------- .../client-apple/examples/avatars/get-q-r.md | 16 +++++----------- .../examples/database/create-document.md | 16 +++++----------- .../examples/database/delete-document.md | 16 +++++----------- .../examples/database/get-document.md | 16 +++++----------- .../examples/database/list-documents.md | 16 +++++----------- .../examples/database/update-document.md | 16 +++++----------- .../examples/functions/create-execution.md | 16 +++++----------- .../examples/functions/get-execution.md | 16 +++++----------- .../examples/functions/list-executions.md | 16 +++++----------- .../examples/functions/retry-build.md | 16 +++++----------- .../examples/locale/get-continents.md | 14 ++++---------- .../examples/locale/get-countries-e-u.md | 14 ++++---------- .../examples/locale/get-countries-phones.md | 14 ++++---------- .../examples/locale/get-countries.md | 14 ++++---------- .../examples/locale/get-currencies.md | 14 ++++---------- .../examples/locale/get-languages.md | 14 ++++---------- .../0.13.x/client-apple/examples/locale/get.md | 14 ++++---------- .../client-apple/examples/storage/create-file.md | 16 +++++----------- .../client-apple/examples/storage/delete-file.md | 16 +++++----------- .../examples/storage/get-file-download.md | 16 +++++----------- .../examples/storage/get-file-preview.md | 16 +++++----------- .../examples/storage/get-file-view.md | 16 +++++----------- .../client-apple/examples/storage/get-file.md | 16 +++++----------- .../client-apple/examples/storage/list-files.md | 16 +++++----------- .../client-apple/examples/storage/update-file.md | 16 +++++----------- .../examples/teams/create-membership.md | 16 +++++----------- .../0.13.x/client-apple/examples/teams/create.md | 16 +++++----------- .../examples/teams/delete-membership.md | 16 +++++----------- .../0.13.x/client-apple/examples/teams/delete.md | 16 +++++----------- .../examples/teams/get-membership.md | 16 +++++----------- .../examples/teams/get-memberships.md | 16 +++++----------- .../0.13.x/client-apple/examples/teams/get.md | 16 +++++----------- .../0.13.x/client-apple/examples/teams/list.md | 14 ++++---------- .../examples/teams/update-membership-roles.md | 16 +++++----------- .../examples/teams/update-membership-status.md | 16 +++++----------- .../0.13.x/client-apple/examples/teams/update.md | 16 +++++----------- .../examples/account/create-recovery.md | 16 +++++----------- .../examples/account/create-verification.md | 16 +++++----------- .../examples/account/delete-session.md | 16 +++++----------- .../examples/account/delete-sessions.md | 14 ++++---------- .../server-swift/examples/account/delete.md | 14 ++++---------- .../server-swift/examples/account/get-logs.md | 14 ++++---------- .../server-swift/examples/account/get-prefs.md | 14 ++++---------- .../server-swift/examples/account/get-session.md | 16 +++++----------- .../examples/account/get-sessions.md | 14 ++++---------- .../0.13.x/server-swift/examples/account/get.md | 14 ++++---------- .../examples/account/update-email.md | 16 +++++----------- .../server-swift/examples/account/update-name.md | 16 +++++----------- .../examples/account/update-password.md | 16 +++++----------- .../examples/account/update-prefs.md | 16 +++++----------- .../examples/account/update-recovery.md | 16 +++++----------- .../examples/account/update-session.md | 16 +++++----------- .../examples/account/update-verification.md | 16 +++++----------- .../server-swift/examples/avatars/get-browser.md | 16 +++++----------- .../examples/avatars/get-credit-card.md | 16 +++++----------- .../server-swift/examples/avatars/get-favicon.md | 16 +++++----------- .../server-swift/examples/avatars/get-flag.md | 16 +++++----------- .../server-swift/examples/avatars/get-image.md | 16 +++++----------- .../examples/avatars/get-initials.md | 14 ++++---------- .../server-swift/examples/avatars/get-q-r.md | 16 +++++----------- .../database/create-boolean-attribute.md | 16 +++++----------- .../examples/database/create-collection.md | 16 +++++----------- .../examples/database/create-document.md | 16 +++++----------- .../examples/database/create-email-attribute.md | 16 +++++----------- .../examples/database/create-enum-attribute.md | 16 +++++----------- .../examples/database/create-float-attribute.md | 16 +++++----------- .../examples/database/create-index.md | 16 +++++----------- .../database/create-integer-attribute.md | 16 +++++----------- .../examples/database/create-ip-attribute.md | 16 +++++----------- .../examples/database/create-string-attribute.md | 16 +++++----------- .../examples/database/create-url-attribute.md | 16 +++++----------- .../examples/database/delete-attribute.md | 16 +++++----------- .../examples/database/delete-collection.md | 16 +++++----------- .../examples/database/delete-document.md | 16 +++++----------- .../examples/database/delete-index.md | 16 +++++----------- .../examples/database/get-attribute.md | 16 +++++----------- .../examples/database/get-collection.md | 16 +++++----------- .../examples/database/get-document.md | 16 +++++----------- .../server-swift/examples/database/get-index.md | 16 +++++----------- .../examples/database/list-attributes.md | 16 +++++----------- .../examples/database/list-collections.md | 14 ++++---------- .../examples/database/list-documents.md | 16 +++++----------- .../examples/database/list-indexes.md | 16 +++++----------- .../examples/database/update-collection.md | 16 +++++----------- .../examples/database/update-document.md | 16 +++++----------- .../examples/functions/create-deployment.md | 16 +++++----------- .../examples/functions/create-execution.md | 16 +++++----------- .../server-swift/examples/functions/create.md | 16 +++++----------- .../examples/functions/delete-deployment.md | 16 +++++----------- .../server-swift/examples/functions/delete.md | 16 +++++----------- .../examples/functions/get-deployment.md | 16 +++++----------- .../examples/functions/get-execution.md | 16 +++++----------- .../server-swift/examples/functions/get.md | 16 +++++----------- .../examples/functions/list-deployments.md | 16 +++++----------- .../examples/functions/list-executions.md | 16 +++++----------- .../examples/functions/list-runtimes.md | 14 ++++---------- .../server-swift/examples/functions/list.md | 14 ++++---------- .../examples/functions/retry-build.md | 16 +++++----------- .../examples/functions/update-deployment.md | 16 +++++----------- .../server-swift/examples/functions/update.md | 16 +++++----------- .../examples/health/get-antivirus.md | 14 ++++---------- .../server-swift/examples/health/get-cache.md | 14 ++++---------- .../server-swift/examples/health/get-d-b.md | 14 ++++---------- .../examples/health/get-queue-certificates.md | 14 ++++---------- .../examples/health/get-queue-functions.md | 14 ++++---------- .../examples/health/get-queue-logs.md | 14 ++++---------- .../examples/health/get-queue-usage.md | 14 ++++---------- .../examples/health/get-queue-webhooks.md | 14 ++++---------- .../examples/health/get-storage-local.md | 14 ++++---------- .../server-swift/examples/health/get-time.md | 14 ++++---------- .../0.13.x/server-swift/examples/health/get.md | 14 ++++---------- .../examples/locale/get-continents.md | 14 ++++---------- .../examples/locale/get-countries-e-u.md | 14 ++++---------- .../examples/locale/get-countries-phones.md | 14 ++++---------- .../examples/locale/get-countries.md | 14 ++++---------- .../examples/locale/get-currencies.md | 14 ++++---------- .../examples/locale/get-languages.md | 14 ++++---------- .../0.13.x/server-swift/examples/locale/get.md | 14 ++++---------- .../examples/storage/create-bucket.md | 16 +++++----------- .../server-swift/examples/storage/create-file.md | 16 +++++----------- .../examples/storage/delete-bucket.md | 16 +++++----------- .../server-swift/examples/storage/delete-file.md | 16 +++++----------- .../server-swift/examples/storage/get-bucket.md | 16 +++++----------- .../examples/storage/get-file-download.md | 16 +++++----------- .../examples/storage/get-file-preview.md | 16 +++++----------- .../examples/storage/get-file-view.md | 16 +++++----------- .../server-swift/examples/storage/get-file.md | 16 +++++----------- .../examples/storage/list-buckets.md | 14 ++++---------- .../server-swift/examples/storage/list-files.md | 16 +++++----------- .../examples/storage/update-bucket.md | 16 +++++----------- .../server-swift/examples/storage/update-file.md | 16 +++++----------- .../examples/teams/create-membership.md | 16 +++++----------- .../0.13.x/server-swift/examples/teams/create.md | 16 +++++----------- .../examples/teams/delete-membership.md | 16 +++++----------- .../0.13.x/server-swift/examples/teams/delete.md | 16 +++++----------- .../examples/teams/get-membership.md | 16 +++++----------- .../examples/teams/get-memberships.md | 16 +++++----------- .../0.13.x/server-swift/examples/teams/get.md | 16 +++++----------- .../0.13.x/server-swift/examples/teams/list.md | 14 ++++---------- .../examples/teams/update-membership-roles.md | 16 +++++----------- .../examples/teams/update-membership-status.md | 16 +++++----------- .../0.13.x/server-swift/examples/teams/update.md | 16 +++++----------- .../0.13.x/server-swift/examples/users/create.md | 16 +++++----------- .../examples/users/delete-session.md | 16 +++++----------- .../examples/users/delete-sessions.md | 16 +++++----------- .../0.13.x/server-swift/examples/users/delete.md | 16 +++++----------- .../server-swift/examples/users/get-logs.md | 16 +++++----------- .../server-swift/examples/users/get-prefs.md | 16 +++++----------- .../server-swift/examples/users/get-sessions.md | 16 +++++----------- .../0.13.x/server-swift/examples/users/get.md | 16 +++++----------- .../0.13.x/server-swift/examples/users/list.md | 14 ++++---------- .../server-swift/examples/users/update-email.md | 16 +++++----------- .../server-swift/examples/users/update-name.md | 16 +++++----------- .../examples/users/update-password.md | 16 +++++----------- .../server-swift/examples/users/update-prefs.md | 16 +++++----------- .../server-swift/examples/users/update-status.md | 16 +++++----------- .../examples/users/update-verification.md | 16 +++++----------- 187 files changed, 887 insertions(+), 2009 deletions(-) diff --git a/docs/examples/0.13.x/client-apple/examples/account/create-anonymous-session.md b/docs/examples/0.13.x/client-apple/examples/account/create-anonymous-session.md index d6bb1918c4..d2d71b9f00 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create-anonymous-session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create-anonymous-session.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.createAnonymousSession() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let session): - print(String(describing: session) - } - } + let session = try await account.createAnonymousSession() + + print(String(describing: session) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/create-j-w-t.md b/docs/examples/0.13.x/client-apple/examples/account/create-j-w-t.md index b2797e7d14..51952f9953 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create-j-w-t.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create-j-w-t.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.createJWT() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let jwt): - print(String(describing: jwt) - } - } + let jwt = try await account.createJWT() + + print(String(describing: jwt) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/create-magic-u-r-l-session.md b/docs/examples/0.13.x/client-apple/examples/account/create-magic-u-r-l-session.md index 0b51e02ff4..3eab67aac4 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create-magic-u-r-l-session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create-magic-u-r-l-session.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.createMagicURLSession( + let token = try await account.createMagicURLSession( userId: "[USER_ID]", email: "email@example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/create-o-auth2session.md b/docs/examples/0.13.x/client-apple/examples/account/create-o-auth2session.md index cb1e4e30a7..ddd7eb28a4 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create-o-auth2session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create-o-auth2session.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.createOAuth2Session( + let success = try await account.createOAuth2Session( provider: "amazon" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let success): - print(String(describing: success) - } - } + ) + + print(String(describing: success) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/create-recovery.md b/docs/examples/0.13.x/client-apple/examples/account/create-recovery.md index dcdfa51937..1f2d9b9e05 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create-recovery.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create-recovery.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.createRecovery( + let token = try await account.createRecovery( email: "email@example.com", url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/create-session.md b/docs/examples/0.13.x/client-apple/examples/account/create-session.md index a0d6d114a1..dcaf9caa67 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create-session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create-session.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.createSession( + let session = try await account.createSession( email: "email@example.com", password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let session): - print(String(describing: session) - } - } + ) + + print(String(describing: session) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/create-verification.md b/docs/examples/0.13.x/client-apple/examples/account/create-verification.md index b144e943bd..cd0f9d5c87 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create-verification.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create-verification.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.createVerification( + let token = try await account.createVerification( url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/create.md b/docs/examples/0.13.x/client-apple/examples/account/create.md index fbf8e181c2..346f7da6e4 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/create.md +++ b/docs/examples/0.13.x/client-apple/examples/account/create.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.create( + let user = try await account.create( userId: "[USER_ID]", email: "email@example.com", password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/delete-session.md b/docs/examples/0.13.x/client-apple/examples/account/delete-session.md index 3d3da9fdff..6f3dd76905 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/delete-session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/delete-session.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.deleteSession( + let result = try await account.deleteSession( sessionId: "[SESSION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/delete-sessions.md b/docs/examples/0.13.x/client-apple/examples/account/delete-sessions.md index 937e27069a..f2721be95e 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/delete-sessions.md +++ b/docs/examples/0.13.x/client-apple/examples/account/delete-sessions.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.deleteSessions() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + let result = try await account.deleteSessions() + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/delete.md b/docs/examples/0.13.x/client-apple/examples/account/delete.md index e43e10c2b7..9676c6dcce 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/delete.md +++ b/docs/examples/0.13.x/client-apple/examples/account/delete.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.delete() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + let result = try await account.delete() + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/get-logs.md b/docs/examples/0.13.x/client-apple/examples/account/get-logs.md index 531b30ac91..326672e682 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/get-logs.md +++ b/docs/examples/0.13.x/client-apple/examples/account/get-logs.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.getLogs() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let logList): - print(String(describing: logList) - } - } + let logList = try await account.getLogs() + + print(String(describing: logList) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/get-prefs.md b/docs/examples/0.13.x/client-apple/examples/account/get-prefs.md index d39f79d2f6..6fb47ce31f 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/get-prefs.md +++ b/docs/examples/0.13.x/client-apple/examples/account/get-prefs.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.getPrefs() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let preferences): - print(String(describing: preferences) - } - } + let preferences = try await account.getPrefs() + + print(String(describing: preferences) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/get-session.md b/docs/examples/0.13.x/client-apple/examples/account/get-session.md index 57244db4f5..fa15d6d222 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/get-session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/get-session.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.getSession( + let session = try await account.getSession( sessionId: "[SESSION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let session): - print(String(describing: session) - } - } + ) + + print(String(describing: session) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/get-sessions.md b/docs/examples/0.13.x/client-apple/examples/account/get-sessions.md index af03882ad5..81c02bbaf3 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/get-sessions.md +++ b/docs/examples/0.13.x/client-apple/examples/account/get-sessions.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.getSessions() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let sessionList): - print(String(describing: sessionList) - } - } + let sessionList = try await account.getSessions() + + print(String(describing: sessionList) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/get.md b/docs/examples/0.13.x/client-apple/examples/account/get.md index 21bd299d00..822dc3007f 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/get.md +++ b/docs/examples/0.13.x/client-apple/examples/account/get.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.get() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + let user = try await account.get() + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-email.md b/docs/examples/0.13.x/client-apple/examples/account/update-email.md index 7e338bec6b..ec74963844 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-email.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-email.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updateEmail( + let user = try await account.updateEmail( email: "email@example.com", password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-magic-u-r-l-session.md b/docs/examples/0.13.x/client-apple/examples/account/update-magic-u-r-l-session.md index 1ea5db9041..34bfab9e80 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-magic-u-r-l-session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-magic-u-r-l-session.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updateMagicURLSession( + let session = try await account.updateMagicURLSession( userId: "[USER_ID]", secret: "[SECRET]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let session): - print(String(describing: session) - } - } + ) + + print(String(describing: session) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-name.md b/docs/examples/0.13.x/client-apple/examples/account/update-name.md index 6eb8e3836d..a757f95253 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-name.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-name.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updateName( + let user = try await account.updateName( name: "[NAME]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-password.md b/docs/examples/0.13.x/client-apple/examples/account/update-password.md index bc5046eb46..0c36e41f42 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-password.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-password.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updatePassword( + let user = try await account.updatePassword( password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-prefs.md b/docs/examples/0.13.x/client-apple/examples/account/update-prefs.md index 0b82ed6ed8..d9197a5482 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-prefs.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-prefs.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updatePrefs( + let user = try await account.updatePrefs( prefs: - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-recovery.md b/docs/examples/0.13.x/client-apple/examples/account/update-recovery.md index 1fc3e8fe92..f412c0f35a 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-recovery.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-recovery.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updateRecovery( + let token = try await account.updateRecovery( userId: "[USER_ID]", secret: "[SECRET]", password: "password", passwordAgain: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-session.md b/docs/examples/0.13.x/client-apple/examples/account/update-session.md index 1af3d2a521..1d9282641c 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-session.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-session.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updateSession( + let session = try await account.updateSession( sessionId: "[SESSION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let session): - print(String(describing: session) - } - } + ) + + print(String(describing: session) } diff --git a/docs/examples/0.13.x/client-apple/examples/account/update-verification.md b/docs/examples/0.13.x/client-apple/examples/account/update-verification.md index 228517d65d..10e46b19d1 100644 --- a/docs/examples/0.13.x/client-apple/examples/account/update-verification.md +++ b/docs/examples/0.13.x/client-apple/examples/account/update-verification.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let account = Account(client) - account.updateVerification( + let token = try await account.updateVerification( userId: "[USER_ID]", secret: "[SECRET]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/client-apple/examples/avatars/get-browser.md b/docs/examples/0.13.x/client-apple/examples/avatars/get-browser.md index 6be1cad9f5..536d9b6167 100644 --- a/docs/examples/0.13.x/client-apple/examples/avatars/get-browser.md +++ b/docs/examples/0.13.x/client-apple/examples/avatars/get-browser.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let avatars = Avatars(client) - avatars.getBrowser( + let byteBuffer = try await avatars.getBrowser( code: "aa" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/avatars/get-credit-card.md b/docs/examples/0.13.x/client-apple/examples/avatars/get-credit-card.md index 71bc427c02..7dff9411d0 100644 --- a/docs/examples/0.13.x/client-apple/examples/avatars/get-credit-card.md +++ b/docs/examples/0.13.x/client-apple/examples/avatars/get-credit-card.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let avatars = Avatars(client) - avatars.getCreditCard( + let byteBuffer = try await avatars.getCreditCard( code: "amex" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/avatars/get-favicon.md b/docs/examples/0.13.x/client-apple/examples/avatars/get-favicon.md index fb2b907258..1e2afab969 100644 --- a/docs/examples/0.13.x/client-apple/examples/avatars/get-favicon.md +++ b/docs/examples/0.13.x/client-apple/examples/avatars/get-favicon.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let avatars = Avatars(client) - avatars.getFavicon( + let byteBuffer = try await avatars.getFavicon( url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/avatars/get-flag.md b/docs/examples/0.13.x/client-apple/examples/avatars/get-flag.md index b642171989..43035a3530 100644 --- a/docs/examples/0.13.x/client-apple/examples/avatars/get-flag.md +++ b/docs/examples/0.13.x/client-apple/examples/avatars/get-flag.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let avatars = Avatars(client) - avatars.getFlag( + let byteBuffer = try await avatars.getFlag( code: "af" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/avatars/get-image.md b/docs/examples/0.13.x/client-apple/examples/avatars/get-image.md index 811a33bdc4..a28299c153 100644 --- a/docs/examples/0.13.x/client-apple/examples/avatars/get-image.md +++ b/docs/examples/0.13.x/client-apple/examples/avatars/get-image.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let avatars = Avatars(client) - avatars.getImage( + let byteBuffer = try await avatars.getImage( url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/avatars/get-initials.md b/docs/examples/0.13.x/client-apple/examples/avatars/get-initials.md index f58c397b64..df22100428 100644 --- a/docs/examples/0.13.x/client-apple/examples/avatars/get-initials.md +++ b/docs/examples/0.13.x/client-apple/examples/avatars/get-initials.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let avatars = Avatars(client) - avatars.getInitials() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + let byteBuffer = try await avatars.getInitials() + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/avatars/get-q-r.md b/docs/examples/0.13.x/client-apple/examples/avatars/get-q-r.md index f5a35ec754..a9e3e9bae1 100644 --- a/docs/examples/0.13.x/client-apple/examples/avatars/get-q-r.md +++ b/docs/examples/0.13.x/client-apple/examples/avatars/get-q-r.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let avatars = Avatars(client) - avatars.getQR( + let byteBuffer = try await avatars.getQR( text: "[TEXT]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/database/create-document.md b/docs/examples/0.13.x/client-apple/examples/database/create-document.md index c3c2684ca4..416580a46f 100644 --- a/docs/examples/0.13.x/client-apple/examples/database/create-document.md +++ b/docs/examples/0.13.x/client-apple/examples/database/create-document.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - database.createDocument( + let document = try await database.createDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]", data: - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let document): - print(String(describing: document) - } - } + ) + + print(String(describing: document) } diff --git a/docs/examples/0.13.x/client-apple/examples/database/delete-document.md b/docs/examples/0.13.x/client-apple/examples/database/delete-document.md index e81e068575..04eecbf316 100644 --- a/docs/examples/0.13.x/client-apple/examples/database/delete-document.md +++ b/docs/examples/0.13.x/client-apple/examples/database/delete-document.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - database.deleteDocument( + let result = try await database.deleteDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/database/get-document.md b/docs/examples/0.13.x/client-apple/examples/database/get-document.md index 0f02176068..26ad5a0b17 100644 --- a/docs/examples/0.13.x/client-apple/examples/database/get-document.md +++ b/docs/examples/0.13.x/client-apple/examples/database/get-document.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - database.getDocument( + let document = try await database.getDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let document): - print(String(describing: document) - } - } + ) + + print(String(describing: document) } diff --git a/docs/examples/0.13.x/client-apple/examples/database/list-documents.md b/docs/examples/0.13.x/client-apple/examples/database/list-documents.md index e6f663c5cf..f11cc2793f 100644 --- a/docs/examples/0.13.x/client-apple/examples/database/list-documents.md +++ b/docs/examples/0.13.x/client-apple/examples/database/list-documents.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - database.listDocuments( + let documentList = try await database.listDocuments( collectionId: "[COLLECTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let documentList): - print(String(describing: documentList) - } - } + ) + + print(String(describing: documentList) } diff --git a/docs/examples/0.13.x/client-apple/examples/database/update-document.md b/docs/examples/0.13.x/client-apple/examples/database/update-document.md index 5399ddb150..dc1e5646ac 100644 --- a/docs/examples/0.13.x/client-apple/examples/database/update-document.md +++ b/docs/examples/0.13.x/client-apple/examples/database/update-document.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let database = Database(client) - database.updateDocument( + let document = try await database.updateDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]", data: - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let document): - print(String(describing: document) - } - } + ) + + print(String(describing: document) } diff --git a/docs/examples/0.13.x/client-apple/examples/functions/create-execution.md b/docs/examples/0.13.x/client-apple/examples/functions/create-execution.md index 004aa4dd04..f086125c35 100644 --- a/docs/examples/0.13.x/client-apple/examples/functions/create-execution.md +++ b/docs/examples/0.13.x/client-apple/examples/functions/create-execution.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let functions = Functions(client) - functions.createExecution( + let execution = try await functions.createExecution( functionId: "[FUNCTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let execution): - print(String(describing: execution) - } - } + ) + + print(String(describing: execution) } diff --git a/docs/examples/0.13.x/client-apple/examples/functions/get-execution.md b/docs/examples/0.13.x/client-apple/examples/functions/get-execution.md index c46bb4096f..503c7f5412 100644 --- a/docs/examples/0.13.x/client-apple/examples/functions/get-execution.md +++ b/docs/examples/0.13.x/client-apple/examples/functions/get-execution.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let functions = Functions(client) - functions.getExecution( + let execution = try await functions.getExecution( functionId: "[FUNCTION_ID]", executionId: "[EXECUTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let execution): - print(String(describing: execution) - } - } + ) + + print(String(describing: execution) } diff --git a/docs/examples/0.13.x/client-apple/examples/functions/list-executions.md b/docs/examples/0.13.x/client-apple/examples/functions/list-executions.md index 04c212bd95..45da8ee7a2 100644 --- a/docs/examples/0.13.x/client-apple/examples/functions/list-executions.md +++ b/docs/examples/0.13.x/client-apple/examples/functions/list-executions.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let functions = Functions(client) - functions.listExecutions( + let executionList = try await functions.listExecutions( functionId: "[FUNCTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let executionList): - print(String(describing: executionList) - } - } + ) + + print(String(describing: executionList) } diff --git a/docs/examples/0.13.x/client-apple/examples/functions/retry-build.md b/docs/examples/0.13.x/client-apple/examples/functions/retry-build.md index 4b43d48fed..1869dc8a61 100644 --- a/docs/examples/0.13.x/client-apple/examples/functions/retry-build.md +++ b/docs/examples/0.13.x/client-apple/examples/functions/retry-build.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let functions = Functions(client) - functions.retryBuild( + let result = try await functions.retryBuild( functionId: "[FUNCTION_ID]", deploymentId: "[DEPLOYMENT_ID]", buildId: "[BUILD_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/locale/get-continents.md b/docs/examples/0.13.x/client-apple/examples/locale/get-continents.md index a07fb10f0f..efd4ffcda3 100644 --- a/docs/examples/0.13.x/client-apple/examples/locale/get-continents.md +++ b/docs/examples/0.13.x/client-apple/examples/locale/get-continents.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let locale = Locale(client) - locale.getContinents() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let continentList): - print(String(describing: continentList) - } - } + let continentList = try await locale.getContinents() + + print(String(describing: continentList) } diff --git a/docs/examples/0.13.x/client-apple/examples/locale/get-countries-e-u.md b/docs/examples/0.13.x/client-apple/examples/locale/get-countries-e-u.md index 58517a0244..74837af07c 100644 --- a/docs/examples/0.13.x/client-apple/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.13.x/client-apple/examples/locale/get-countries-e-u.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let locale = Locale(client) - locale.getCountriesEU() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let countryList): - print(String(describing: countryList) - } - } + let countryList = try await locale.getCountriesEU() + + print(String(describing: countryList) } diff --git a/docs/examples/0.13.x/client-apple/examples/locale/get-countries-phones.md b/docs/examples/0.13.x/client-apple/examples/locale/get-countries-phones.md index cc28ba46d4..6a9b72c197 100644 --- a/docs/examples/0.13.x/client-apple/examples/locale/get-countries-phones.md +++ b/docs/examples/0.13.x/client-apple/examples/locale/get-countries-phones.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let locale = Locale(client) - locale.getCountriesPhones() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let phoneList): - print(String(describing: phoneList) - } - } + let phoneList = try await locale.getCountriesPhones() + + print(String(describing: phoneList) } diff --git a/docs/examples/0.13.x/client-apple/examples/locale/get-countries.md b/docs/examples/0.13.x/client-apple/examples/locale/get-countries.md index b37cb0d0df..f753379f59 100644 --- a/docs/examples/0.13.x/client-apple/examples/locale/get-countries.md +++ b/docs/examples/0.13.x/client-apple/examples/locale/get-countries.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let locale = Locale(client) - locale.getCountries() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let countryList): - print(String(describing: countryList) - } - } + let countryList = try await locale.getCountries() + + print(String(describing: countryList) } diff --git a/docs/examples/0.13.x/client-apple/examples/locale/get-currencies.md b/docs/examples/0.13.x/client-apple/examples/locale/get-currencies.md index a97e93e15c..9282fef954 100644 --- a/docs/examples/0.13.x/client-apple/examples/locale/get-currencies.md +++ b/docs/examples/0.13.x/client-apple/examples/locale/get-currencies.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let locale = Locale(client) - locale.getCurrencies() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let currencyList): - print(String(describing: currencyList) - } - } + let currencyList = try await locale.getCurrencies() + + print(String(describing: currencyList) } diff --git a/docs/examples/0.13.x/client-apple/examples/locale/get-languages.md b/docs/examples/0.13.x/client-apple/examples/locale/get-languages.md index a236afcf74..bc178e6b7a 100644 --- a/docs/examples/0.13.x/client-apple/examples/locale/get-languages.md +++ b/docs/examples/0.13.x/client-apple/examples/locale/get-languages.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let locale = Locale(client) - locale.getLanguages() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let languageList): - print(String(describing: languageList) - } - } + let languageList = try await locale.getLanguages() + + print(String(describing: languageList) } diff --git a/docs/examples/0.13.x/client-apple/examples/locale/get.md b/docs/examples/0.13.x/client-apple/examples/locale/get.md index 0d93de1a70..2b6101c5ed 100644 --- a/docs/examples/0.13.x/client-apple/examples/locale/get.md +++ b/docs/examples/0.13.x/client-apple/examples/locale/get.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let locale = Locale(client) - locale.get() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let locale): - print(String(describing: locale) - } - } + let locale = try await locale.get() + + print(String(describing: locale) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/create-file.md b/docs/examples/0.13.x/client-apple/examples/storage/create-file.md index bc0e8acde8..84e4af6425 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/create-file.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/create-file.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.createFile( + let file = try await storage.createFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]", file: File(name: "image.jpg", buffer: yourByteBuffer) - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let file): - print(String(describing: file) - } - } + ) + + print(String(describing: file) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/delete-file.md b/docs/examples/0.13.x/client-apple/examples/storage/delete-file.md index 9a08f565ed..5bad56677d 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/delete-file.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/delete-file.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.deleteFile( + let result = try await storage.deleteFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/get-file-download.md b/docs/examples/0.13.x/client-apple/examples/storage/get-file-download.md index 388b50b2e7..1504f78d33 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/get-file-download.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/get-file-download.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.getFileDownload( + let byteBuffer = try await storage.getFileDownload( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/get-file-preview.md b/docs/examples/0.13.x/client-apple/examples/storage/get-file-preview.md index a93b2110ec..33b80c49ae 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/get-file-preview.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/get-file-preview.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.getFilePreview( + let byteBuffer = try await storage.getFilePreview( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/get-file-view.md b/docs/examples/0.13.x/client-apple/examples/storage/get-file-view.md index 1ce7923824..7e3524aabb 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/get-file-view.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/get-file-view.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.getFileView( + let byteBuffer = try await storage.getFileView( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/get-file.md b/docs/examples/0.13.x/client-apple/examples/storage/get-file.md index 0eda773488..1f2fae973d 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/get-file.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/get-file.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.getFile( + let file = try await storage.getFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let file): - print(String(describing: file) - } - } + ) + + print(String(describing: file) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/list-files.md b/docs/examples/0.13.x/client-apple/examples/storage/list-files.md index f2853b70d2..01ae959e43 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/list-files.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/list-files.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.listFiles( + let fileList = try await storage.listFiles( bucketId: "[BUCKET_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let fileList): - print(String(describing: fileList) - } - } + ) + + print(String(describing: fileList) } diff --git a/docs/examples/0.13.x/client-apple/examples/storage/update-file.md b/docs/examples/0.13.x/client-apple/examples/storage/update-file.md index 762b547b06..85503f0199 100644 --- a/docs/examples/0.13.x/client-apple/examples/storage/update-file.md +++ b/docs/examples/0.13.x/client-apple/examples/storage/update-file.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let storage = Storage(client) - storage.updateFile( + let file = try await storage.updateFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let file): - print(String(describing: file) - } - } + ) + + print(String(describing: file) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/create-membership.md b/docs/examples/0.13.x/client-apple/examples/teams/create-membership.md index 01b3e507f1..5a81e431d9 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/create-membership.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/create-membership.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.createMembership( + let membership = try await teams.createMembership( teamId: "[TEAM_ID]", email: "email@example.com", roles: [], url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membership): - print(String(describing: membership) - } - } + ) + + print(String(describing: membership) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/create.md b/docs/examples/0.13.x/client-apple/examples/teams/create.md index 9b404b49b1..227ceb37b2 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/create.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/create.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.create( + let team = try await teams.create( teamId: "[TEAM_ID]", name: "[NAME]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let team): - print(String(describing: team) - } - } + ) + + print(String(describing: team) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/delete-membership.md b/docs/examples/0.13.x/client-apple/examples/teams/delete-membership.md index 9f3086b549..46a1ad7728 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/delete-membership.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/delete-membership.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.deleteMembership( + let result = try await teams.deleteMembership( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/delete.md b/docs/examples/0.13.x/client-apple/examples/teams/delete.md index 49f1155cbf..d117a8bbf7 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/delete.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/delete.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.delete( + let result = try await teams.delete( teamId: "[TEAM_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/get-membership.md b/docs/examples/0.13.x/client-apple/examples/teams/get-membership.md index 071ea308ec..46bd83ecd6 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/get-membership.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/get-membership.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.getMembership( + let membershipList = try await teams.getMembership( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membershipList): - print(String(describing: membershipList) - } - } + ) + + print(String(describing: membershipList) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/get-memberships.md b/docs/examples/0.13.x/client-apple/examples/teams/get-memberships.md index 3597ce1a47..32e79a6faf 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/get-memberships.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/get-memberships.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.getMemberships( + let membershipList = try await teams.getMemberships( teamId: "[TEAM_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membershipList): - print(String(describing: membershipList) - } - } + ) + + print(String(describing: membershipList) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/get.md b/docs/examples/0.13.x/client-apple/examples/teams/get.md index 93b0f77379..e4e0b9b68b 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/get.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/get.md @@ -1,19 +1,13 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.get( + let team = try await teams.get( teamId: "[TEAM_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let team): - print(String(describing: team) - } - } + ) + + print(String(describing: team) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/list.md b/docs/examples/0.13.x/client-apple/examples/teams/list.md index 2131371af3..a1e454fd6c 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/list.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/list.md @@ -1,17 +1,11 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.list() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let teamList): - print(String(describing: teamList) - } - } + let teamList = try await teams.list() + + print(String(describing: teamList) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/update-membership-roles.md b/docs/examples/0.13.x/client-apple/examples/teams/update-membership-roles.md index 43d0db9aca..68ed875e42 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/update-membership-roles.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/update-membership-roles.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.updateMembershipRoles( + let membership = try await teams.updateMembershipRoles( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]", roles: [] - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membership): - print(String(describing: membership) - } - } + ) + + print(String(describing: membership) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/update-membership-status.md b/docs/examples/0.13.x/client-apple/examples/teams/update-membership-status.md index dc82da705a..9712539a6e 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/update-membership-status.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/update-membership-status.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.updateMembershipStatus( + let membership = try await teams.updateMembershipStatus( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]", userId: "[USER_ID]", secret: "[SECRET]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membership): - print(String(describing: membership) - } - } + ) + + print(String(describing: membership) } diff --git a/docs/examples/0.13.x/client-apple/examples/teams/update.md b/docs/examples/0.13.x/client-apple/examples/teams/update.md index a0822e814b..90a4332756 100644 --- a/docs/examples/0.13.x/client-apple/examples/teams/update.md +++ b/docs/examples/0.13.x/client-apple/examples/teams/update.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID - let teams = Teams(client) - teams.update( + let team = try await teams.update( teamId: "[TEAM_ID]", name: "[NAME]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let team): - print(String(describing: team) - } - } + ) + + print(String(describing: team) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/create-recovery.md b/docs/examples/0.13.x/server-swift/examples/account/create-recovery.md index a3644ee15e..e0048ea302 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/create-recovery.md +++ b/docs/examples/0.13.x/server-swift/examples/account/create-recovery.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.createRecovery( + let token = try await account.createRecovery( email: "email@example.com", url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/create-verification.md b/docs/examples/0.13.x/server-swift/examples/account/create-verification.md index 1fbf8dd567..530dc6638d 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/create-verification.md +++ b/docs/examples/0.13.x/server-swift/examples/account/create-verification.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.createVerification( + let token = try await account.createVerification( url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/delete-session.md b/docs/examples/0.13.x/server-swift/examples/account/delete-session.md index b45a95eabd..38cdf4ac38 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/delete-session.md +++ b/docs/examples/0.13.x/server-swift/examples/account/delete-session.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.deleteSession( + let result = try await account.deleteSession( sessionId: "[SESSION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/delete-sessions.md b/docs/examples/0.13.x/server-swift/examples/account/delete-sessions.md index 4e3aad5207..3ea9dc10d8 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/delete-sessions.md +++ b/docs/examples/0.13.x/server-swift/examples/account/delete-sessions.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.deleteSessions() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + let result = try await account.deleteSessions() + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/delete.md b/docs/examples/0.13.x/server-swift/examples/account/delete.md index fd1711b15b..ff554d0d4c 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/delete.md +++ b/docs/examples/0.13.x/server-swift/examples/account/delete.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.delete() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + let result = try await account.delete() + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/get-logs.md b/docs/examples/0.13.x/server-swift/examples/account/get-logs.md index 0d039edaf0..ef45c16fb5 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/get-logs.md +++ b/docs/examples/0.13.x/server-swift/examples/account/get-logs.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.getLogs() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let logList): - print(String(describing: logList) - } - } + let logList = try await account.getLogs() + + print(String(describing: logList) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/get-prefs.md b/docs/examples/0.13.x/server-swift/examples/account/get-prefs.md index 5039b7895d..1585b2b940 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/get-prefs.md +++ b/docs/examples/0.13.x/server-swift/examples/account/get-prefs.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.getPrefs() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let preferences): - print(String(describing: preferences) - } - } + let preferences = try await account.getPrefs() + + print(String(describing: preferences) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/get-session.md b/docs/examples/0.13.x/server-swift/examples/account/get-session.md index 7234217239..d21b42a702 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/get-session.md +++ b/docs/examples/0.13.x/server-swift/examples/account/get-session.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.getSession( + let session = try await account.getSession( sessionId: "[SESSION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let session): - print(String(describing: session) - } - } + ) + + print(String(describing: session) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/get-sessions.md b/docs/examples/0.13.x/server-swift/examples/account/get-sessions.md index 01a7c4614c..279657d2da 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/get-sessions.md +++ b/docs/examples/0.13.x/server-swift/examples/account/get-sessions.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.getSessions() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let sessionList): - print(String(describing: sessionList) - } - } + let sessionList = try await account.getSessions() + + print(String(describing: sessionList) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/get.md b/docs/examples/0.13.x/server-swift/examples/account/get.md index 38eddbb405..cd5e53f2d9 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/get.md +++ b/docs/examples/0.13.x/server-swift/examples/account/get.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.get() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + let user = try await account.get() + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/update-email.md b/docs/examples/0.13.x/server-swift/examples/account/update-email.md index e8cfd482f8..82c0fc3a4f 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/update-email.md +++ b/docs/examples/0.13.x/server-swift/examples/account/update-email.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.updateEmail( + let user = try await account.updateEmail( email: "email@example.com", password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/update-name.md b/docs/examples/0.13.x/server-swift/examples/account/update-name.md index 88e321d090..ce1c35d606 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/update-name.md +++ b/docs/examples/0.13.x/server-swift/examples/account/update-name.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.updateName( + let user = try await account.updateName( name: "[NAME]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/update-password.md b/docs/examples/0.13.x/server-swift/examples/account/update-password.md index c6f3108dbd..188610bcbe 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/update-password.md +++ b/docs/examples/0.13.x/server-swift/examples/account/update-password.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.updatePassword( + let user = try await account.updatePassword( password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/update-prefs.md b/docs/examples/0.13.x/server-swift/examples/account/update-prefs.md index 62398d73ce..95de4632dd 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/update-prefs.md +++ b/docs/examples/0.13.x/server-swift/examples/account/update-prefs.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.updatePrefs( + let user = try await account.updatePrefs( prefs: - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/update-recovery.md b/docs/examples/0.13.x/server-swift/examples/account/update-recovery.md index 4ae4d4813e..2814bf124f 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/update-recovery.md +++ b/docs/examples/0.13.x/server-swift/examples/account/update-recovery.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.updateRecovery( + let token = try await account.updateRecovery( userId: "[USER_ID]", secret: "[SECRET]", password: "password", passwordAgain: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/update-session.md b/docs/examples/0.13.x/server-swift/examples/account/update-session.md index a5271e917f..8ce9c3ce79 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/update-session.md +++ b/docs/examples/0.13.x/server-swift/examples/account/update-session.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.updateSession( + let session = try await account.updateSession( sessionId: "[SESSION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let session): - print(String(describing: session) - } - } + ) + + print(String(describing: session) } diff --git a/docs/examples/0.13.x/server-swift/examples/account/update-verification.md b/docs/examples/0.13.x/server-swift/examples/account/update-verification.md index 6d0a9d1e68..b8255614e6 100644 --- a/docs/examples/0.13.x/server-swift/examples/account/update-verification.md +++ b/docs/examples/0.13.x/server-swift/examples/account/update-verification.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let account = Account(client) - account.updateVerification( + let token = try await account.updateVerification( userId: "[USER_ID]", secret: "[SECRET]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let token): - print(String(describing: token) - } - } + ) + + print(String(describing: token) } diff --git a/docs/examples/0.13.x/server-swift/examples/avatars/get-browser.md b/docs/examples/0.13.x/server-swift/examples/avatars/get-browser.md index cc8cd69898..fe5be8cfa4 100644 --- a/docs/examples/0.13.x/server-swift/examples/avatars/get-browser.md +++ b/docs/examples/0.13.x/server-swift/examples/avatars/get-browser.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let avatars = Avatars(client) - avatars.getBrowser( + let byteBuffer = try await avatars.getBrowser( code: "aa" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/avatars/get-credit-card.md b/docs/examples/0.13.x/server-swift/examples/avatars/get-credit-card.md index c655bee31f..ad5296d06c 100644 --- a/docs/examples/0.13.x/server-swift/examples/avatars/get-credit-card.md +++ b/docs/examples/0.13.x/server-swift/examples/avatars/get-credit-card.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let avatars = Avatars(client) - avatars.getCreditCard( + let byteBuffer = try await avatars.getCreditCard( code: "amex" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/avatars/get-favicon.md b/docs/examples/0.13.x/server-swift/examples/avatars/get-favicon.md index e1f0b8d027..c7cdfa7142 100644 --- a/docs/examples/0.13.x/server-swift/examples/avatars/get-favicon.md +++ b/docs/examples/0.13.x/server-swift/examples/avatars/get-favicon.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let avatars = Avatars(client) - avatars.getFavicon( + let byteBuffer = try await avatars.getFavicon( url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/avatars/get-flag.md b/docs/examples/0.13.x/server-swift/examples/avatars/get-flag.md index 5d584e532f..7e8e94b4c5 100644 --- a/docs/examples/0.13.x/server-swift/examples/avatars/get-flag.md +++ b/docs/examples/0.13.x/server-swift/examples/avatars/get-flag.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let avatars = Avatars(client) - avatars.getFlag( + let byteBuffer = try await avatars.getFlag( code: "af" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/avatars/get-image.md b/docs/examples/0.13.x/server-swift/examples/avatars/get-image.md index 009d11ec4d..63ba881d4b 100644 --- a/docs/examples/0.13.x/server-swift/examples/avatars/get-image.md +++ b/docs/examples/0.13.x/server-swift/examples/avatars/get-image.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let avatars = Avatars(client) - avatars.getImage( + let byteBuffer = try await avatars.getImage( url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/avatars/get-initials.md b/docs/examples/0.13.x/server-swift/examples/avatars/get-initials.md index 029afa5f5f..e783f5b47d 100644 --- a/docs/examples/0.13.x/server-swift/examples/avatars/get-initials.md +++ b/docs/examples/0.13.x/server-swift/examples/avatars/get-initials.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let avatars = Avatars(client) - avatars.getInitials() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + let byteBuffer = try await avatars.getInitials() + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/avatars/get-q-r.md b/docs/examples/0.13.x/server-swift/examples/avatars/get-q-r.md index 992abfdfa7..ae8d51c0a3 100644 --- a/docs/examples/0.13.x/server-swift/examples/avatars/get-q-r.md +++ b/docs/examples/0.13.x/server-swift/examples/avatars/get-q-r.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let avatars = Avatars(client) - avatars.getQR( + let byteBuffer = try await avatars.getQR( text: "[TEXT]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-boolean-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-boolean-attribute.md index 25be2d66e9..1a59923305 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-boolean-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-boolean-attribute.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createBooleanAttribute( + let attributeBoolean = try await database.createBooleanAttribute( collectionId: "[COLLECTION_ID]", key: "", required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeBoolean): - print(String(describing: attributeBoolean) - } - } + ) + + print(String(describing: attributeBoolean) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-collection.md b/docs/examples/0.13.x/server-swift/examples/database/create-collection.md index 5a8c89d289..4c5e2987a5 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-collection.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-collection.md @@ -1,24 +1,18 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createCollection( + let collection = try await database.createCollection( collectionId: "[COLLECTION_ID]", name: "[NAME]", permission: "document", read: ["role:all"], write: ["role:all"] - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let collection): - print(String(describing: collection) - } - } + ) + + print(String(describing: collection) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-document.md b/docs/examples/0.13.x/server-swift/examples/database/create-document.md index cf7c98edec..c2b4c47759 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-document.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-document.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createDocument( + let document = try await database.createDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]", data: - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let document): - print(String(describing: document) - } - } + ) + + print(String(describing: document) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-email-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-email-attribute.md index 169e2adb14..90ce11c6e4 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-email-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-email-attribute.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createEmailAttribute( + let attributeEmail = try await database.createEmailAttribute( collectionId: "[COLLECTION_ID]", key: "", required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeEmail): - print(String(describing: attributeEmail) - } - } + ) + + print(String(describing: attributeEmail) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-enum-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-enum-attribute.md index 33db352a29..6595e2b002 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-enum-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-enum-attribute.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createEnumAttribute( + let attributeEnum = try await database.createEnumAttribute( collectionId: "[COLLECTION_ID]", key: "", elements: [], required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeEnum): - print(String(describing: attributeEnum) - } - } + ) + + print(String(describing: attributeEnum) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-float-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-float-attribute.md index 0d1385d07b..573e201648 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-float-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-float-attribute.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createFloatAttribute( + let attributeFloat = try await database.createFloatAttribute( collectionId: "[COLLECTION_ID]", key: "", required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeFloat): - print(String(describing: attributeFloat) - } - } + ) + + print(String(describing: attributeFloat) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-index.md b/docs/examples/0.13.x/server-swift/examples/database/create-index.md index fc78251aad..0ee0ceb9a0 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-index.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-index.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createIndex( + let index = try await database.createIndex( collectionId: "[COLLECTION_ID]", key: "", type: "key", attributes: [] - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let index): - print(String(describing: index) - } - } + ) + + print(String(describing: index) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-integer-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-integer-attribute.md index 9efe11dc60..a893203994 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-integer-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-integer-attribute.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createIntegerAttribute( + let attributeInteger = try await database.createIntegerAttribute( collectionId: "[COLLECTION_ID]", key: "", required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeInteger): - print(String(describing: attributeInteger) - } - } + ) + + print(String(describing: attributeInteger) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-ip-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-ip-attribute.md index e6840d0516..26b14ab126 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-ip-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-ip-attribute.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createIpAttribute( + let attributeIp = try await database.createIpAttribute( collectionId: "[COLLECTION_ID]", key: "", required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeIp): - print(String(describing: attributeIp) - } - } + ) + + print(String(describing: attributeIp) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-string-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-string-attribute.md index 754253ca8a..126415bac0 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-string-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-string-attribute.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createStringAttribute( + let attributeString = try await database.createStringAttribute( collectionId: "[COLLECTION_ID]", key: "", size: 1, required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeString): - print(String(describing: attributeString) - } - } + ) + + print(String(describing: attributeString) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/create-url-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/create-url-attribute.md index 71b73eae5c..24d7f668af 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/create-url-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/create-url-attribute.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.createUrlAttribute( + let attributeUrl = try await database.createUrlAttribute( collectionId: "[COLLECTION_ID]", key: "", required: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeUrl): - print(String(describing: attributeUrl) - } - } + ) + + print(String(describing: attributeUrl) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/delete-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/delete-attribute.md index 6993b883d0..1202fd4147 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/delete-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/delete-attribute.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.deleteAttribute( + let result = try await database.deleteAttribute( collectionId: "[COLLECTION_ID]", key: "" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/delete-collection.md b/docs/examples/0.13.x/server-swift/examples/database/delete-collection.md index f400c5f549..63c7261758 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/delete-collection.md +++ b/docs/examples/0.13.x/server-swift/examples/database/delete-collection.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.deleteCollection( + let result = try await database.deleteCollection( collectionId: "[COLLECTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/delete-document.md b/docs/examples/0.13.x/server-swift/examples/database/delete-document.md index cf6e1f4e5f..d481ca5828 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/delete-document.md +++ b/docs/examples/0.13.x/server-swift/examples/database/delete-document.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.deleteDocument( + let result = try await database.deleteDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/delete-index.md b/docs/examples/0.13.x/server-swift/examples/database/delete-index.md index ce1b264d8f..317de6a3df 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/delete-index.md +++ b/docs/examples/0.13.x/server-swift/examples/database/delete-index.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.deleteIndex( + let result = try await database.deleteIndex( collectionId: "[COLLECTION_ID]", key: "" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/get-attribute.md b/docs/examples/0.13.x/server-swift/examples/database/get-attribute.md index 6b8d4d741a..9bcbf53f61 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/get-attribute.md +++ b/docs/examples/0.13.x/server-swift/examples/database/get-attribute.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.getAttribute( + let result = try await database.getAttribute( collectionId: "[COLLECTION_ID]", key: "" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/get-collection.md b/docs/examples/0.13.x/server-swift/examples/database/get-collection.md index b337aa56c4..08206a8241 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/get-collection.md +++ b/docs/examples/0.13.x/server-swift/examples/database/get-collection.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.getCollection( + let collection = try await database.getCollection( collectionId: "[COLLECTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let collection): - print(String(describing: collection) - } - } + ) + + print(String(describing: collection) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/get-document.md b/docs/examples/0.13.x/server-swift/examples/database/get-document.md index 215a0cd092..f10b7da615 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/get-document.md +++ b/docs/examples/0.13.x/server-swift/examples/database/get-document.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.getDocument( + let document = try await database.getDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let document): - print(String(describing: document) - } - } + ) + + print(String(describing: document) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/get-index.md b/docs/examples/0.13.x/server-swift/examples/database/get-index.md index be9a849532..c7ef827359 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/get-index.md +++ b/docs/examples/0.13.x/server-swift/examples/database/get-index.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.getIndex( + let index = try await database.getIndex( collectionId: "[COLLECTION_ID]", key: "" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let index): - print(String(describing: index) - } - } + ) + + print(String(describing: index) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/list-attributes.md b/docs/examples/0.13.x/server-swift/examples/database/list-attributes.md index 76493d353b..d51bb9577b 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/list-attributes.md +++ b/docs/examples/0.13.x/server-swift/examples/database/list-attributes.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.listAttributes( + let attributeList = try await database.listAttributes( collectionId: "[COLLECTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let attributeList): - print(String(describing: attributeList) - } - } + ) + + print(String(describing: attributeList) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/list-collections.md b/docs/examples/0.13.x/server-swift/examples/database/list-collections.md index 1422793dc1..87dc2386ed 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/list-collections.md +++ b/docs/examples/0.13.x/server-swift/examples/database/list-collections.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.listCollections() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let collectionList): - print(String(describing: collectionList) - } - } + let collectionList = try await database.listCollections() + + print(String(describing: collectionList) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/list-documents.md b/docs/examples/0.13.x/server-swift/examples/database/list-documents.md index f4bd05391d..27c32f5e27 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/list-documents.md +++ b/docs/examples/0.13.x/server-swift/examples/database/list-documents.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.listDocuments( + let documentList = try await database.listDocuments( collectionId: "[COLLECTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let documentList): - print(String(describing: documentList) - } - } + ) + + print(String(describing: documentList) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/list-indexes.md b/docs/examples/0.13.x/server-swift/examples/database/list-indexes.md index 60355c7eaf..6210d6f79c 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/list-indexes.md +++ b/docs/examples/0.13.x/server-swift/examples/database/list-indexes.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.listIndexes( + let indexList = try await database.listIndexes( collectionId: "[COLLECTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let indexList): - print(String(describing: indexList) - } - } + ) + + print(String(describing: indexList) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/update-collection.md b/docs/examples/0.13.x/server-swift/examples/database/update-collection.md index a98e01ebb8..817be46374 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/update-collection.md +++ b/docs/examples/0.13.x/server-swift/examples/database/update-collection.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.updateCollection( + let collection = try await database.updateCollection( collectionId: "[COLLECTION_ID]", name: "[NAME]", permission: "document" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let collection): - print(String(describing: collection) - } - } + ) + + print(String(describing: collection) } diff --git a/docs/examples/0.13.x/server-swift/examples/database/update-document.md b/docs/examples/0.13.x/server-swift/examples/database/update-document.md index 39eb92cd13..82222ddb20 100644 --- a/docs/examples/0.13.x/server-swift/examples/database/update-document.md +++ b/docs/examples/0.13.x/server-swift/examples/database/update-document.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let database = Database(client) - database.updateDocument( + let document = try await database.updateDocument( collectionId: "[COLLECTION_ID]", documentId: "[DOCUMENT_ID]", data: - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let document): - print(String(describing: document) - } - } + ) + + print(String(describing: document) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/create-deployment.md b/docs/examples/0.13.x/server-swift/examples/functions/create-deployment.md index 92e521d2b9..9e580fe807 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/create-deployment.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/create-deployment.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.createDeployment( + let deployment = try await functions.createDeployment( functionId: "[FUNCTION_ID]", entrypoint: "[ENTRYPOINT]", code: File(name: "image.jpg", buffer: yourByteBuffer), activate: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let deployment): - print(String(describing: deployment) - } - } + ) + + print(String(describing: deployment) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/create-execution.md b/docs/examples/0.13.x/server-swift/examples/functions/create-execution.md index 1bb3c99834..02dde0c312 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/create-execution.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/create-execution.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.createExecution( + let execution = try await functions.createExecution( functionId: "[FUNCTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let execution): - print(String(describing: execution) - } - } + ) + + print(String(describing: execution) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/create.md b/docs/examples/0.13.x/server-swift/examples/functions/create.md index 4bd6b8079a..e6775116f3 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/create.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/create.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.create( + let function = try await functions.create( functionId: "[FUNCTION_ID]", name: "[NAME]", execute: [], runtime: "node-14.5" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let function): - print(String(describing: function) - } - } + ) + + print(String(describing: function) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/delete-deployment.md b/docs/examples/0.13.x/server-swift/examples/functions/delete-deployment.md index ab70431672..322c52b7ed 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/delete-deployment.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/delete-deployment.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.deleteDeployment( + let result = try await functions.deleteDeployment( functionId: "[FUNCTION_ID]", deploymentId: "[DEPLOYMENT_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/delete.md b/docs/examples/0.13.x/server-swift/examples/functions/delete.md index 37ff9e5035..c5628163da 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/delete.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/delete.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.delete( + let result = try await functions.delete( functionId: "[FUNCTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/get-deployment.md b/docs/examples/0.13.x/server-swift/examples/functions/get-deployment.md index dc365ea05c..897d5315d2 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/get-deployment.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/get-deployment.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.getDeployment( + let deploymentList = try await functions.getDeployment( functionId: "[FUNCTION_ID]", deploymentId: "[DEPLOYMENT_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let deploymentList): - print(String(describing: deploymentList) - } - } + ) + + print(String(describing: deploymentList) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/get-execution.md b/docs/examples/0.13.x/server-swift/examples/functions/get-execution.md index 9991e127c0..d5bcf092ac 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/get-execution.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/get-execution.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.getExecution( + let execution = try await functions.getExecution( functionId: "[FUNCTION_ID]", executionId: "[EXECUTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let execution): - print(String(describing: execution) - } - } + ) + + print(String(describing: execution) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/get.md b/docs/examples/0.13.x/server-swift/examples/functions/get.md index 600f27eebb..6675916a47 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/get.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/get.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.get( + let function = try await functions.get( functionId: "[FUNCTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let function): - print(String(describing: function) - } - } + ) + + print(String(describing: function) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/list-deployments.md b/docs/examples/0.13.x/server-swift/examples/functions/list-deployments.md index d556d22f9e..fce719736a 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/list-deployments.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/list-deployments.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.listDeployments( + let deploymentList = try await functions.listDeployments( functionId: "[FUNCTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let deploymentList): - print(String(describing: deploymentList) - } - } + ) + + print(String(describing: deploymentList) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/list-executions.md b/docs/examples/0.13.x/server-swift/examples/functions/list-executions.md index 872cfcb218..95d27cbc05 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/list-executions.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/list-executions.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.listExecutions( + let executionList = try await functions.listExecutions( functionId: "[FUNCTION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let executionList): - print(String(describing: executionList) - } - } + ) + + print(String(describing: executionList) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/list-runtimes.md b/docs/examples/0.13.x/server-swift/examples/functions/list-runtimes.md index 9d8fa4ccfb..e87ad2c46c 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/list-runtimes.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/list-runtimes.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.listRuntimes() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let runtimeList): - print(String(describing: runtimeList) - } - } + let runtimeList = try await functions.listRuntimes() + + print(String(describing: runtimeList) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/list.md b/docs/examples/0.13.x/server-swift/examples/functions/list.md index 0c1bd2e450..695350d95a 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/list.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/list.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.list() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let functionList): - print(String(describing: functionList) - } - } + let functionList = try await functions.list() + + print(String(describing: functionList) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/retry-build.md b/docs/examples/0.13.x/server-swift/examples/functions/retry-build.md index 7e25b4a716..ba995313c5 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/retry-build.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/retry-build.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.retryBuild( + let result = try await functions.retryBuild( functionId: "[FUNCTION_ID]", deploymentId: "[DEPLOYMENT_ID]", buildId: "[BUILD_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/update-deployment.md b/docs/examples/0.13.x/server-swift/examples/functions/update-deployment.md index 22e0658b10..37d8cbb8fd 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/update-deployment.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/update-deployment.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.updateDeployment( + let function = try await functions.updateDeployment( functionId: "[FUNCTION_ID]", deploymentId: "[DEPLOYMENT_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let function): - print(String(describing: function) - } - } + ) + + print(String(describing: function) } diff --git a/docs/examples/0.13.x/server-swift/examples/functions/update.md b/docs/examples/0.13.x/server-swift/examples/functions/update.md index d3e296358f..7a7e5ed6d0 100644 --- a/docs/examples/0.13.x/server-swift/examples/functions/update.md +++ b/docs/examples/0.13.x/server-swift/examples/functions/update.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let functions = Functions(client) - functions.update( + let function = try await functions.update( functionId: "[FUNCTION_ID]", name: "[NAME]", execute: [] - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let function): - print(String(describing: function) - } - } + ) + + print(String(describing: function) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-antivirus.md b/docs/examples/0.13.x/server-swift/examples/health/get-antivirus.md index bb44ae9c61..3eafa2c2f1 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-antivirus.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-antivirus.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getAntivirus() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthAntivirus): - print(String(describing: healthAntivirus) - } - } + let healthAntivirus = try await health.getAntivirus() + + print(String(describing: healthAntivirus) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-cache.md b/docs/examples/0.13.x/server-swift/examples/health/get-cache.md index f0d038b06c..20831b4d39 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-cache.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-cache.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getCache() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthStatus): - print(String(describing: healthStatus) - } - } + let healthStatus = try await health.getCache() + + print(String(describing: healthStatus) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-d-b.md b/docs/examples/0.13.x/server-swift/examples/health/get-d-b.md index 70c5f791f6..5808c99a73 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-d-b.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-d-b.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getDB() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthStatus): - print(String(describing: healthStatus) - } - } + let healthStatus = try await health.getDB() + + print(String(describing: healthStatus) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-queue-certificates.md b/docs/examples/0.13.x/server-swift/examples/health/get-queue-certificates.md index 70cc5dcaec..123b452f99 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-queue-certificates.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-queue-certificates.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getQueueCertificates() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthQueue): - print(String(describing: healthQueue) - } - } + let healthQueue = try await health.getQueueCertificates() + + print(String(describing: healthQueue) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-queue-functions.md b/docs/examples/0.13.x/server-swift/examples/health/get-queue-functions.md index 15af0f7f3b..c3949a769c 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-queue-functions.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-queue-functions.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getQueueFunctions() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthQueue): - print(String(describing: healthQueue) - } - } + let healthQueue = try await health.getQueueFunctions() + + print(String(describing: healthQueue) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-queue-logs.md b/docs/examples/0.13.x/server-swift/examples/health/get-queue-logs.md index 953e8dd929..6a36fa966c 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-queue-logs.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-queue-logs.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getQueueLogs() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthQueue): - print(String(describing: healthQueue) - } - } + let healthQueue = try await health.getQueueLogs() + + print(String(describing: healthQueue) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-queue-usage.md b/docs/examples/0.13.x/server-swift/examples/health/get-queue-usage.md index c2ab62a31b..aee6dbe4f6 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-queue-usage.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-queue-usage.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getQueueUsage() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthQueue): - print(String(describing: healthQueue) - } - } + let healthQueue = try await health.getQueueUsage() + + print(String(describing: healthQueue) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-queue-webhooks.md b/docs/examples/0.13.x/server-swift/examples/health/get-queue-webhooks.md index 7922adc589..bc6b7bcb14 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-queue-webhooks.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-queue-webhooks.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getQueueWebhooks() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthQueue): - print(String(describing: healthQueue) - } - } + let healthQueue = try await health.getQueueWebhooks() + + print(String(describing: healthQueue) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-storage-local.md b/docs/examples/0.13.x/server-swift/examples/health/get-storage-local.md index 31d1c4020e..773d8dd483 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-storage-local.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-storage-local.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getStorageLocal() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthStatus): - print(String(describing: healthStatus) - } - } + let healthStatus = try await health.getStorageLocal() + + print(String(describing: healthStatus) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get-time.md b/docs/examples/0.13.x/server-swift/examples/health/get-time.md index e14b8664d5..edbc171ea9 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get-time.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get-time.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.getTime() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthTime): - print(String(describing: healthTime) - } - } + let healthTime = try await health.getTime() + + print(String(describing: healthTime) } diff --git a/docs/examples/0.13.x/server-swift/examples/health/get.md b/docs/examples/0.13.x/server-swift/examples/health/get.md index f43c3b4a85..770c09aa66 100644 --- a/docs/examples/0.13.x/server-swift/examples/health/get.md +++ b/docs/examples/0.13.x/server-swift/examples/health/get.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let health = Health(client) - health.get() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let healthStatus): - print(String(describing: healthStatus) - } - } + let healthStatus = try await health.get() + + print(String(describing: healthStatus) } diff --git a/docs/examples/0.13.x/server-swift/examples/locale/get-continents.md b/docs/examples/0.13.x/server-swift/examples/locale/get-continents.md index c6f4f3247c..a7f89e0176 100644 --- a/docs/examples/0.13.x/server-swift/examples/locale/get-continents.md +++ b/docs/examples/0.13.x/server-swift/examples/locale/get-continents.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let locale = Locale(client) - locale.getContinents() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let continentList): - print(String(describing: continentList) - } - } + let continentList = try await locale.getContinents() + + print(String(describing: continentList) } diff --git a/docs/examples/0.13.x/server-swift/examples/locale/get-countries-e-u.md b/docs/examples/0.13.x/server-swift/examples/locale/get-countries-e-u.md index ee36c4b2d0..f357bd3990 100644 --- a/docs/examples/0.13.x/server-swift/examples/locale/get-countries-e-u.md +++ b/docs/examples/0.13.x/server-swift/examples/locale/get-countries-e-u.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let locale = Locale(client) - locale.getCountriesEU() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let countryList): - print(String(describing: countryList) - } - } + let countryList = try await locale.getCountriesEU() + + print(String(describing: countryList) } diff --git a/docs/examples/0.13.x/server-swift/examples/locale/get-countries-phones.md b/docs/examples/0.13.x/server-swift/examples/locale/get-countries-phones.md index 3cd368884c..052caa1dda 100644 --- a/docs/examples/0.13.x/server-swift/examples/locale/get-countries-phones.md +++ b/docs/examples/0.13.x/server-swift/examples/locale/get-countries-phones.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let locale = Locale(client) - locale.getCountriesPhones() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let phoneList): - print(String(describing: phoneList) - } - } + let phoneList = try await locale.getCountriesPhones() + + print(String(describing: phoneList) } diff --git a/docs/examples/0.13.x/server-swift/examples/locale/get-countries.md b/docs/examples/0.13.x/server-swift/examples/locale/get-countries.md index b19fab3e6e..3e37c4b22b 100644 --- a/docs/examples/0.13.x/server-swift/examples/locale/get-countries.md +++ b/docs/examples/0.13.x/server-swift/examples/locale/get-countries.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let locale = Locale(client) - locale.getCountries() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let countryList): - print(String(describing: countryList) - } - } + let countryList = try await locale.getCountries() + + print(String(describing: countryList) } diff --git a/docs/examples/0.13.x/server-swift/examples/locale/get-currencies.md b/docs/examples/0.13.x/server-swift/examples/locale/get-currencies.md index adc43dd46e..a548db9b2e 100644 --- a/docs/examples/0.13.x/server-swift/examples/locale/get-currencies.md +++ b/docs/examples/0.13.x/server-swift/examples/locale/get-currencies.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let locale = Locale(client) - locale.getCurrencies() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let currencyList): - print(String(describing: currencyList) - } - } + let currencyList = try await locale.getCurrencies() + + print(String(describing: currencyList) } diff --git a/docs/examples/0.13.x/server-swift/examples/locale/get-languages.md b/docs/examples/0.13.x/server-swift/examples/locale/get-languages.md index 935e493cd5..23d9b44245 100644 --- a/docs/examples/0.13.x/server-swift/examples/locale/get-languages.md +++ b/docs/examples/0.13.x/server-swift/examples/locale/get-languages.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let locale = Locale(client) - locale.getLanguages() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let languageList): - print(String(describing: languageList) - } - } + let languageList = try await locale.getLanguages() + + print(String(describing: languageList) } diff --git a/docs/examples/0.13.x/server-swift/examples/locale/get.md b/docs/examples/0.13.x/server-swift/examples/locale/get.md index c624adf984..fd0a9dd1e7 100644 --- a/docs/examples/0.13.x/server-swift/examples/locale/get.md +++ b/docs/examples/0.13.x/server-swift/examples/locale/get.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let locale = Locale(client) - locale.get() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let locale): - print(String(describing: locale) - } - } + let locale = try await locale.get() + + print(String(describing: locale) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/create-bucket.md b/docs/examples/0.13.x/server-swift/examples/storage/create-bucket.md index 09d51fa0af..d930c56b65 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/create-bucket.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/create-bucket.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.createBucket( + let bucket = try await storage.createBucket( bucketId: "[BUCKET_ID]", name: "[NAME]", permission: "file" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let bucket): - print(String(describing: bucket) - } - } + ) + + print(String(describing: bucket) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/create-file.md b/docs/examples/0.13.x/server-swift/examples/storage/create-file.md index 052576c9b2..e55bca79a1 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/create-file.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/create-file.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.createFile( + let file = try await storage.createFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]", file: File(name: "image.jpg", buffer: yourByteBuffer) - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let file): - print(String(describing: file) - } - } + ) + + print(String(describing: file) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/delete-bucket.md b/docs/examples/0.13.x/server-swift/examples/storage/delete-bucket.md index be7b11f19a..18687fb278 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/delete-bucket.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/delete-bucket.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.deleteBucket( + let result = try await storage.deleteBucket( bucketId: "[BUCKET_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/delete-file.md b/docs/examples/0.13.x/server-swift/examples/storage/delete-file.md index 0076bf6725..305d6e1d81 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/delete-file.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/delete-file.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.deleteFile( + let result = try await storage.deleteFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/get-bucket.md b/docs/examples/0.13.x/server-swift/examples/storage/get-bucket.md index 93bf98d5c0..f04e2db3c9 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/get-bucket.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/get-bucket.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.getBucket( + let bucket = try await storage.getBucket( bucketId: "[BUCKET_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let bucket): - print(String(describing: bucket) - } - } + ) + + print(String(describing: bucket) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/get-file-download.md b/docs/examples/0.13.x/server-swift/examples/storage/get-file-download.md index 7d22225358..28c427c620 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/get-file-download.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/get-file-download.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.getFileDownload( + let byteBuffer = try await storage.getFileDownload( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/get-file-preview.md b/docs/examples/0.13.x/server-swift/examples/storage/get-file-preview.md index 5d7b5e78b1..20b87191e1 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/get-file-preview.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/get-file-preview.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.getFilePreview( + let byteBuffer = try await storage.getFilePreview( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/get-file-view.md b/docs/examples/0.13.x/server-swift/examples/storage/get-file-view.md index fcd346b7b6..a17fba0a14 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/get-file-view.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/get-file-view.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.getFileView( + let byteBuffer = try await storage.getFileView( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let byteBuffer): - print(String(describing: byteBuffer) - } - } + ) + + print(String(describing: byteBuffer) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/get-file.md b/docs/examples/0.13.x/server-swift/examples/storage/get-file.md index 2fe71f5539..6b02fcd0ee 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/get-file.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/get-file.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.getFile( + let file = try await storage.getFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let file): - print(String(describing: file) - } - } + ) + + print(String(describing: file) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/list-buckets.md b/docs/examples/0.13.x/server-swift/examples/storage/list-buckets.md index 28db56d482..361ef626b5 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/list-buckets.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/list-buckets.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.listBuckets() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let bucketList): - print(String(describing: bucketList) - } - } + let bucketList = try await storage.listBuckets() + + print(String(describing: bucketList) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/list-files.md b/docs/examples/0.13.x/server-swift/examples/storage/list-files.md index d0c32bc382..68a6ca40c4 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/list-files.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/list-files.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.listFiles( + let fileList = try await storage.listFiles( bucketId: "[BUCKET_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let fileList): - print(String(describing: fileList) - } - } + ) + + print(String(describing: fileList) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/update-bucket.md b/docs/examples/0.13.x/server-swift/examples/storage/update-bucket.md index a22c1b7078..259ac6ad64 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/update-bucket.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/update-bucket.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.updateBucket( + let bucket = try await storage.updateBucket( bucketId: "[BUCKET_ID]", name: "[NAME]", permission: "file" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let bucket): - print(String(describing: bucket) - } - } + ) + + print(String(describing: bucket) } diff --git a/docs/examples/0.13.x/server-swift/examples/storage/update-file.md b/docs/examples/0.13.x/server-swift/examples/storage/update-file.md index 48ca8664a1..12f8150085 100644 --- a/docs/examples/0.13.x/server-swift/examples/storage/update-file.md +++ b/docs/examples/0.13.x/server-swift/examples/storage/update-file.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let storage = Storage(client) - storage.updateFile( + let file = try await storage.updateFile( bucketId: "[BUCKET_ID]", fileId: "[FILE_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let file): - print(String(describing: file) - } - } + ) + + print(String(describing: file) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/create-membership.md b/docs/examples/0.13.x/server-swift/examples/teams/create-membership.md index 3d69b095b1..a732ec676a 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/create-membership.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/create-membership.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.createMembership( + let membership = try await teams.createMembership( teamId: "[TEAM_ID]", email: "email@example.com", roles: [], url: "https://example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membership): - print(String(describing: membership) - } - } + ) + + print(String(describing: membership) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/create.md b/docs/examples/0.13.x/server-swift/examples/teams/create.md index 7e0446f203..80edd0cadc 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/create.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/create.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.create( + let team = try await teams.create( teamId: "[TEAM_ID]", name: "[NAME]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let team): - print(String(describing: team) - } - } + ) + + print(String(describing: team) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/delete-membership.md b/docs/examples/0.13.x/server-swift/examples/teams/delete-membership.md index 99f0d30d9a..84f3157550 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/delete-membership.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/delete-membership.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.deleteMembership( + let result = try await teams.deleteMembership( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/delete.md b/docs/examples/0.13.x/server-swift/examples/teams/delete.md index 6d75bc83cb..d8808a6565 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/delete.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/delete.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.delete( + let result = try await teams.delete( teamId: "[TEAM_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/get-membership.md b/docs/examples/0.13.x/server-swift/examples/teams/get-membership.md index 4c4cabafe6..b85d7dc0de 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/get-membership.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/get-membership.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.getMembership( + let membershipList = try await teams.getMembership( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membershipList): - print(String(describing: membershipList) - } - } + ) + + print(String(describing: membershipList) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/get-memberships.md b/docs/examples/0.13.x/server-swift/examples/teams/get-memberships.md index f265b6c3aa..06ca6761eb 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/get-memberships.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/get-memberships.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.getMemberships( + let membershipList = try await teams.getMemberships( teamId: "[TEAM_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membershipList): - print(String(describing: membershipList) - } - } + ) + + print(String(describing: membershipList) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/get.md b/docs/examples/0.13.x/server-swift/examples/teams/get.md index be1f9c5c1c..d1c4500442 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/get.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/get.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.get( + let team = try await teams.get( teamId: "[TEAM_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let team): - print(String(describing: team) - } - } + ) + + print(String(describing: team) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/list.md b/docs/examples/0.13.x/server-swift/examples/teams/list.md index 4b46984932..3a9fa822ae 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/list.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/list.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.list() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let teamList): - print(String(describing: teamList) - } - } + let teamList = try await teams.list() + + print(String(describing: teamList) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/update-membership-roles.md b/docs/examples/0.13.x/server-swift/examples/teams/update-membership-roles.md index c0d5f08a49..fd0084786a 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/update-membership-roles.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/update-membership-roles.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.updateMembershipRoles( + let membership = try await teams.updateMembershipRoles( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]", roles: [] - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membership): - print(String(describing: membership) - } - } + ) + + print(String(describing: membership) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/update-membership-status.md b/docs/examples/0.13.x/server-swift/examples/teams/update-membership-status.md index 7c229da6ad..4b6f3eda43 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/update-membership-status.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/update-membership-status.md @@ -1,23 +1,17 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...") // Your secret JSON Web Token - let teams = Teams(client) - teams.updateMembershipStatus( + let membership = try await teams.updateMembershipStatus( teamId: "[TEAM_ID]", membershipId: "[MEMBERSHIP_ID]", userId: "[USER_ID]", secret: "[SECRET]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let membership): - print(String(describing: membership) - } - } + ) + + print(String(describing: membership) } diff --git a/docs/examples/0.13.x/server-swift/examples/teams/update.md b/docs/examples/0.13.x/server-swift/examples/teams/update.md index d9e98baab8..683dfd4e30 100644 --- a/docs/examples/0.13.x/server-swift/examples/teams/update.md +++ b/docs/examples/0.13.x/server-swift/examples/teams/update.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let teams = Teams(client) - teams.update( + let team = try await teams.update( teamId: "[TEAM_ID]", name: "[NAME]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let team): - print(String(describing: team) - } - } + ) + + print(String(describing: team) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/create.md b/docs/examples/0.13.x/server-swift/examples/users/create.md index 2137de26c1..8aa45d4e3a 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/create.md +++ b/docs/examples/0.13.x/server-swift/examples/users/create.md @@ -1,22 +1,16 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.create( + let user = try await users.create( userId: "[USER_ID]", email: "email@example.com", password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/delete-session.md b/docs/examples/0.13.x/server-swift/examples/users/delete-session.md index 9bc0adb41c..50cbf470d3 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/delete-session.md +++ b/docs/examples/0.13.x/server-swift/examples/users/delete-session.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.deleteSession( + let result = try await users.deleteSession( userId: "[USER_ID]", sessionId: "[SESSION_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/delete-sessions.md b/docs/examples/0.13.x/server-swift/examples/users/delete-sessions.md index 041058f2a5..a8b7802577 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/delete-sessions.md +++ b/docs/examples/0.13.x/server-swift/examples/users/delete-sessions.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.deleteSessions( + let result = try await users.deleteSessions( userId: "[USER_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/delete.md b/docs/examples/0.13.x/server-swift/examples/users/delete.md index 7575269eb6..f970492afa 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/delete.md +++ b/docs/examples/0.13.x/server-swift/examples/users/delete.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.delete( + let result = try await users.delete( userId: "[USER_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let ): - print(String(describing: ) - } - } + ) + + print(String(describing: result) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/get-logs.md b/docs/examples/0.13.x/server-swift/examples/users/get-logs.md index c5ad92275b..62554054ed 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/get-logs.md +++ b/docs/examples/0.13.x/server-swift/examples/users/get-logs.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.getLogs( + let logList = try await users.getLogs( userId: "[USER_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let logList): - print(String(describing: logList) - } - } + ) + + print(String(describing: logList) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/get-prefs.md b/docs/examples/0.13.x/server-swift/examples/users/get-prefs.md index dcbbf263ef..d664dbbb0d 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/get-prefs.md +++ b/docs/examples/0.13.x/server-swift/examples/users/get-prefs.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.getPrefs( + let preferences = try await users.getPrefs( userId: "[USER_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let preferences): - print(String(describing: preferences) - } - } + ) + + print(String(describing: preferences) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/get-sessions.md b/docs/examples/0.13.x/server-swift/examples/users/get-sessions.md index 1762ca9438..dc37960c32 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/get-sessions.md +++ b/docs/examples/0.13.x/server-swift/examples/users/get-sessions.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.getSessions( + let sessionList = try await users.getSessions( userId: "[USER_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let sessionList): - print(String(describing: sessionList) - } - } + ) + + print(String(describing: sessionList) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/get.md b/docs/examples/0.13.x/server-swift/examples/users/get.md index 92bd108d11..dc57a924ba 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/get.md +++ b/docs/examples/0.13.x/server-swift/examples/users/get.md @@ -1,20 +1,14 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.get( + let user = try await users.get( userId: "[USER_ID]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/list.md b/docs/examples/0.13.x/server-swift/examples/users/list.md index 0e77d85803..7ea73d0515 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/list.md +++ b/docs/examples/0.13.x/server-swift/examples/users/list.md @@ -1,18 +1,12 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.list() { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let userList): - print(String(describing: userList) - } - } + let userList = try await users.list() + + print(String(describing: userList) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/update-email.md b/docs/examples/0.13.x/server-swift/examples/users/update-email.md index 93571e217a..602191c6f0 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/update-email.md +++ b/docs/examples/0.13.x/server-swift/examples/users/update-email.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.updateEmail( + let user = try await users.updateEmail( userId: "[USER_ID]", email: "email@example.com" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/update-name.md b/docs/examples/0.13.x/server-swift/examples/users/update-name.md index f085f9eb45..7fa3b543ec 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/update-name.md +++ b/docs/examples/0.13.x/server-swift/examples/users/update-name.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.updateName( + let user = try await users.updateName( userId: "[USER_ID]", name: "[NAME]" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/update-password.md b/docs/examples/0.13.x/server-swift/examples/users/update-password.md index 8b19c67df6..5a3bde40b6 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/update-password.md +++ b/docs/examples/0.13.x/server-swift/examples/users/update-password.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.updatePassword( + let user = try await users.updatePassword( userId: "[USER_ID]", password: "password" - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/update-prefs.md b/docs/examples/0.13.x/server-swift/examples/users/update-prefs.md index 39245979e5..9fee0fc012 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/update-prefs.md +++ b/docs/examples/0.13.x/server-swift/examples/users/update-prefs.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.updatePrefs( + let preferences = try await users.updatePrefs( userId: "[USER_ID]", prefs: - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let preferences): - print(String(describing: preferences) - } - } + ) + + print(String(describing: preferences) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/update-status.md b/docs/examples/0.13.x/server-swift/examples/users/update-status.md index cf92817cbf..28dc7d7844 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/update-status.md +++ b/docs/examples/0.13.x/server-swift/examples/users/update-status.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.updateStatus( + let user = try await users.updateStatus( userId: "[USER_ID]", status: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } diff --git a/docs/examples/0.13.x/server-swift/examples/users/update-verification.md b/docs/examples/0.13.x/server-swift/examples/users/update-verification.md index 7e3f8b485e..8c711370e4 100644 --- a/docs/examples/0.13.x/server-swift/examples/users/update-verification.md +++ b/docs/examples/0.13.x/server-swift/examples/users/update-verification.md @@ -1,21 +1,15 @@ import Appwrite -func main() { +func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID .setKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key - let users = Users(client) - users.updateVerification( + let user = try await users.updateVerification( userId: "[USER_ID]", emailVerification: xfalse - ) { result in - switch result { - case .failure(let error): - print(error.message) - case .success(let user): - print(String(describing: user) - } - } + ) + + print(String(describing: user) } From c1cd1214badd23d2f3864b8992af307e8132c65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 12 Apr 2022 11:11:37 +0000 Subject: [PATCH 59/73] Fix mail,url icons --- composer.lock | 2 +- public/dist/scripts/app-all.js | 6 +++--- public/dist/scripts/app.js | 6 +++--- public/dist/styles/default-ltr.css | 2 +- public/dist/styles/default-rtl.css | 2 +- public/styles/icons.less | 2 ++ 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index 866dec5cec..d9d2f30b2b 100644 --- a/composer.lock +++ b/composer.lock @@ -6584,5 +6584,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/public/dist/scripts/app-all.js b/public/dist/scripts/app-all.js index 03b14b185e..23968d7bbe 100644 --- a/public/dist/scripts/app-all.js +++ b/public/dist/scripts/app-all.js @@ -3835,7 +3835,7 @@ list["filters-"+filter.key]=params[key][i];}}}} return list;};let apply=function(params){let cached=container.get(name);cached=cached?cached.params:[];params=Object.assign(cached,params);container.set(name,{name:name,params:params,query:serialize(params),forward:parseInt(params.offset)+parseInt(params.limit),backward:parseInt(params.offset)-parseInt(params.limit),keys:flatten(params)},true,name);document.dispatchEvent(new CustomEvent(name+"-changed",{bubbles:false,cancelable:true}));};switch(element.tagName){case"INPUT":break;case"TEXTAREA":break;case"BUTTON":element.addEventListener("click",function(){apply(JSON.parse(expression.parse(element.dataset["params"]||"{}")));});break;case"FORM":element.addEventListener("input",function(){apply(form.toJson(element));});element.addEventListener("change",function(){apply(form.toJson(element));});element.addEventListener("reset",function(){setTimeout(function(){apply(form.toJson(element));},0);});events=events.trim().split(",");for(let y=0;y=distance)&&(distance>=0)){if(minLink){minLink.classList.remove('selected');} -console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantId":"oauth2MicrosoftTenantId"},"Apple":{"keyId":"oauth2AppleKeyId","teamId":"oauth2AppleTeamId","p8":"oauth2AppleP8"}} +console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantID":"oauth2MicrosoftTenantId"},"Apple":{"keyID":"oauth2AppleKeyId","teamID":"oauth2AppleTeamId","p8":"oauth2AppleP8"}} let provider=element.getAttribute("data-forms-oauth-custom");if(!provider||!providers.hasOwnProperty(provider)){console.error("Provider for custom form not set or unkown")} let config=providers[provider];element.addEventListener('change',sync);let elements={};for(const key in config){if(Object.hasOwnProperty.call(config,key)){elements[key]=document.getElementById(config[key]);elements[key].addEventListener('change',update);}} function update(){let json={};for(const key in elements){if(Object.hasOwnProperty.call(elements,key)){json[key]=elements[key].value}} @@ -3859,14 +3859,14 @@ tag.className="tag";tag.textContent=value;tag.addEventListener("click",function( if(element.required&&array.length===0){add.setCustomValidity("Please add permissions");}else{add.setCustomValidity("");}};tags.className="tags";preview.className="tags-list";add.type="text";add.className="add";add.placeholder=element.placeholder;tags.addEventListener("click",function(){add.focus();});add.addEventListener("keydown",listen);add.addEventListener("blur",function(event){if(add.value!==''){array.push(add.value);add.value="";element.value=JSON.stringify(array);check();}});tags.appendChild(preview);tags.appendChild(add);element.parentNode.insertBefore(tags,element);element.addEventListener("change",check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-count",controller:function(element){var counter=document.createElement("div");counter.className="counter";element.parentNode.insertBefore(counter,element.nextSibling);var count=function(){if(0<=element.maxLength){counter.innerText=(element.maxLength-element.value.length).toString()+" / "+ element.maxLength;}else{var words=element.value!==""?element.value.trim().split(" ").length:0;counter.innerText=words+" words and "+element.value.length.toString()+" chars";}};element.addEventListener("keyup",count);element.addEventListener("change",count);element.addEventListener("cut",count);element.addEventListener("paste",count);element.addEventListener("drop",count);count();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-direction",controller:function(element,rtl){var setDirection=function(){var value=element.value[0]?element.value:"";var direction="ltr";var align="left";if(rtl.isRTL(value)){direction="rtl";align="right";} element.style.direction=direction;element.style.textAlign=align;};element.addEventListener("keyup",setDirection);element.addEventListener("change",setDirection);element.addEventListener("cut",setDirection);element.addEventListener("paste",setDirection);element.addEventListener("drop",setDirection);setDirection();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-resize",controller:function(element,window){function resize(){var scrollLeft=window.pageXOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollLeft;var scrollTop=window.pageYOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollTop;var offset=element.offsetHeight-element.clientHeight;element.style.height="auto";element.style.height=element.scrollHeight+offset+"px";window.scrollTo(scrollLeft,scrollTop);} -element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;console.log(element);var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){try{result=JSON.parse(result);}catch(err){} +element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){try{result=JSON.parse(result);}catch(err){} preview.innerHTML="";count.innerHTML="0 / "+max;if(!result){return;} var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/buckets/"+ result.bucketId+"/files/"+ result.fileId+"/preview?width="+ previewWidth+"&height="+ previewHeight+"&project="+project+"&mode=admin";image.alt=previewAlt;file.className="file avatar";file.tabIndex=0;file.appendChild(image);preview.appendChild(file);var remove=(function(result){return function(event){render(result.$id);element.value='';};})(result);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=JSON.stringify(result);};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));sdk.storage.createFile('default','unique()',files[0],read,write).then(function(response){onComplete(message);render({bucketId:response.bucketId,fileId:response.$id});},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} -render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);console.log(output);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} +render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} window.getSelection().removeAllRanges();};button.addEventListener("click",copy);}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-page-title",repeat:true,controller:function(element,document,expression){document.title=expression.parse(element.getAttribute("data-page-title"))||document.title;}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-to',repeat:false,controller:function(element,window){let button=window.document.createElement('button');button.className='scroll-to icon-up-dir';button.alt='Back To Top';button.title='Back To Top';button.addEventListener('click',function(){element.scrollIntoView(true,{behavior:'smooth'});button.blur();},false);element.appendChild(button);}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-direction',repeat:false,controller:function(element,window){let position=0;let check=function(){let direction=window.document.documentElement.scrollTop;if(direction>position){element.classList.remove('scroll-to-top') element.classList.add('scroll-to-bottom')} else{element.classList.remove('scroll-to-bottom') diff --git a/public/dist/scripts/app.js b/public/dist/scripts/app.js index 9ae4d12e64..255f4767a0 100644 --- a/public/dist/scripts/app.js +++ b/public/dist/scripts/app.js @@ -785,7 +785,7 @@ list["filters-"+filter.key]=params[key][i];}}}} return list;};let apply=function(params){let cached=container.get(name);cached=cached?cached.params:[];params=Object.assign(cached,params);container.set(name,{name:name,params:params,query:serialize(params),forward:parseInt(params.offset)+parseInt(params.limit),backward:parseInt(params.offset)-parseInt(params.limit),keys:flatten(params)},true,name);document.dispatchEvent(new CustomEvent(name+"-changed",{bubbles:false,cancelable:true}));};switch(element.tagName){case"INPUT":break;case"TEXTAREA":break;case"BUTTON":element.addEventListener("click",function(){apply(JSON.parse(expression.parse(element.dataset["params"]||"{}")));});break;case"FORM":element.addEventListener("input",function(){apply(form.toJson(element));});element.addEventListener("change",function(){apply(form.toJson(element));});element.addEventListener("reset",function(){setTimeout(function(){apply(form.toJson(element));},0);});events=events.trim().split(",");for(let y=0;y=distance)&&(distance>=0)){if(minLink){minLink.classList.remove('selected');} -console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantId":"oauth2MicrosoftTenantId"},"Apple":{"keyId":"oauth2AppleKeyId","teamId":"oauth2AppleTeamId","p8":"oauth2AppleP8"}} +console.log('old',minLink);minDistance=distance;minElement=title;minLink=links[i];minLink.classList.add('selected');console.log('new',minLink);}}};window.addEventListener('scroll',check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-oauth-custom",controller:function(element){let providers={"Microsoft":{"clientSecret":"oauth2MicrosoftClientSecret","tenantID":"oauth2MicrosoftTenantId"},"Apple":{"keyID":"oauth2AppleKeyId","teamID":"oauth2AppleTeamId","p8":"oauth2AppleP8"}} let provider=element.getAttribute("data-forms-oauth-custom");if(!provider||!providers.hasOwnProperty(provider)){console.error("Provider for custom form not set or unkown")} let config=providers[provider];element.addEventListener('change',sync);let elements={};for(const key in config){if(Object.hasOwnProperty.call(config,key)){elements[key]=document.getElementById(config[key]);elements[key].addEventListener('change',update);}} function update(){let json={};for(const key in elements){if(Object.hasOwnProperty.call(elements,key)){json[key]=elements[key].value}} @@ -809,14 +809,14 @@ tag.className="tag";tag.textContent=value;tag.addEventListener("click",function( if(element.required&&array.length===0){add.setCustomValidity("Please add permissions");}else{add.setCustomValidity("");}};tags.className="tags";preview.className="tags-list";add.type="text";add.className="add";add.placeholder=element.placeholder;tags.addEventListener("click",function(){add.focus();});add.addEventListener("keydown",listen);add.addEventListener("blur",function(event){if(add.value!==''){array.push(add.value);add.value="";element.value=JSON.stringify(array);check();}});tags.appendChild(preview);tags.appendChild(add);element.parentNode.insertBefore(tags,element);element.addEventListener("change",check);check();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-count",controller:function(element){var counter=document.createElement("div");counter.className="counter";element.parentNode.insertBefore(counter,element.nextSibling);var count=function(){if(0<=element.maxLength){counter.innerText=(element.maxLength-element.value.length).toString()+" / "+ element.maxLength;}else{var words=element.value!==""?element.value.trim().split(" ").length:0;counter.innerText=words+" words and "+element.value.length.toString()+" chars";}};element.addEventListener("keyup",count);element.addEventListener("change",count);element.addEventListener("cut",count);element.addEventListener("paste",count);element.addEventListener("drop",count);count();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-direction",controller:function(element,rtl){var setDirection=function(){var value=element.value[0]?element.value:"";var direction="ltr";var align="left";if(rtl.isRTL(value)){direction="rtl";align="right";} element.style.direction=direction;element.style.textAlign=align;};element.addEventListener("keyup",setDirection);element.addEventListener("change",setDirection);element.addEventListener("cut",setDirection);element.addEventListener("paste",setDirection);element.addEventListener("drop",setDirection);setDirection();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-text-resize",controller:function(element,window){function resize(){var scrollLeft=window.pageXOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollLeft;var scrollTop=window.pageYOffset||(window.document.documentElement||window.document.body.parentNode||window.document.body).scrollTop;var offset=element.offsetHeight-element.clientHeight;element.style.height="auto";element.style.height=element.scrollHeight+offset+"px";window.scrollTo(scrollLeft,scrollTop);} -element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;console.log(element);var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){try{result=JSON.parse(result);}catch(err){} +element.addEventListener("keyup",resize);element.addEventListener("change",resize);element.addEventListener("cut",resize);element.addEventListener("paste",resize);element.addEventListener("drop",resize);window.addEventListener("resize",resize);resize();}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-upload",controller:function(element,container,alerts,expression,env,search){var scope=element.dataset["scope"];var project=expression.parse(element.dataset["project"]||"console");var labelButton=element.dataset["labelButton"]||"Upload";var labelLoading=element.dataset["labelLoading"]||"Uploading...";var previewWidth=element.dataset["previewWidth"]||200;var previewHeight=element.dataset["previewHeight"]||200;var previewAlt=element.dataset["previewAlt"]||200;var accept=element.dataset["accept"]||"";var searchButton=(element.dataset["search"]||0);var required=element.dataset["required"]||false;var className=element.dataset["class"]||"upload";var max=parseInt(element.dataset["max"]||4);var sdk=scope==="sdk"?container.get("sdk"):container.get("console");var output=element.value||null;var wrapper=document.createElement("div");var input=document.createElement("input");var upload=document.createElement("div");var preview=document.createElement("ul");var progress=document.createElement("div");var count=document.createElement("div");wrapper.className=className;input.type="file";input.accept=accept;input.required=required;input.tabIndex=-1;count.className="count";upload.className="button reverse margin-bottom-small";upload.innerHTML=' '+labelButton;upload.tabIndex=0;preview.className="preview";progress.className="progress";progress.style.width="0%";progress.style.display="none";var onComplete=function(message){alerts.remove(message);input.disabled=false;upload.classList.remove("disabled");progress.style.width="0%";progress.style.display="none";};var render=function(result){try{result=JSON.parse(result);}catch(err){} preview.innerHTML="";count.innerHTML="0 / "+max;if(!result){return;} var file=document.createElement("li");var image=document.createElement("img");image.src=image.src=env.API+"/storage/buckets/"+ result.bucketId+"/files/"+ result.fileId+"/preview?width="+ previewWidth+"&height="+ previewHeight+"&project="+project+"&mode=admin";image.alt=previewAlt;file.className="file avatar";file.tabIndex=0;file.appendChild(image);preview.appendChild(file);var remove=(function(result){return function(event){render(result.$id);element.value='';};})(result);file.addEventListener("click",remove);file.addEventListener("keypress",remove);element.value=JSON.stringify(result);};input.addEventListener("change",function(){var message=alerts.add({text:labelLoading,class:""},0);var files=input.files;var read=JSON.parse(expression.parse(element.dataset["read"]||"[]"));var write=JSON.parse(expression.parse(element.dataset["write"]||"[]"));sdk.storage.createFile('default','unique()',files[0],read,write).then(function(response){onComplete(message);render({bucketId:response.bucketId,fileId:response.$id});},function(error){alerts.add({text:"An error occurred!",class:""},3000);onComplete(message);});input.disabled=true;});element.addEventListener("change",function(){if(!element.value){return;} -render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);console.log(output);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} +render(element.value);wrapper.scrollIntoView();});upload.addEventListener("keypress",function(){input.click();});element.parentNode.insertBefore(wrapper,element);wrapper.appendChild(preview);wrapper.appendChild(progress);wrapper.appendChild(upload);upload.appendChild(input);render(output);if(searchButton){let searchOpen=document.createElement("button");searchOpen.type='button';searchOpen.innerHTML=' Search';searchOpen.classList.add('reverse');let path=container.scope(searchButton);searchOpen.addEventListener('click',function(){search.selected=element.value;search.path=path;document.dispatchEvent(new CustomEvent("open-file-search",{bubbles:false,cancelable:true}));});wrapper.appendChild(searchOpen);}}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-cookies",controller:function(element,alerts,cookie,env){if(!cookie.get("cookie-alert")){let text=element.dataset["cookies"]||"";alerts.add({text:text,class:"cookie-alert",link:env.HOME+"/policy/cookies",label:'Learn More',callback:function(){cookie.set("cookie-alert","true",365*10);}},0);}}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-copy',repeat:false,controller:function(document,element,alerts){let button=document.createElement("i");button.type="button";button.title="Copy to Clipboard";button.className=element.getAttribute("data-class")||"icon-docs note copy";button.style.cursor="pointer";element.parentNode.insertBefore(button,element.nextSibling);let copy=function(event){window.getSelection().removeAllRanges();let range=document.createRange();range.selectNode(element);window.getSelection().addRange(range);try{document.execCommand("copy");alerts.add({text:"Copied to clipboard",class:""},3000);}catch(err){alerts.add({text:"Failed to copy text ",class:"error"},3000);} window.getSelection().removeAllRanges();};button.addEventListener("click",copy);}});})(window);(function(window){window.ls.container.get("view").add({selector:"data-page-title",repeat:true,controller:function(element,document,expression){document.title=expression.parse(element.getAttribute("data-page-title"))||document.title;}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-to',repeat:false,controller:function(element,window){let button=window.document.createElement('button');button.className='scroll-to icon-up-dir';button.alt='Back To Top';button.title='Back To Top';button.addEventListener('click',function(){element.scrollIntoView(true,{behavior:'smooth'});button.blur();},false);element.appendChild(button);}});})(window);(function(window){"use strict";window.ls.view.add({selector:'data-general-scroll-direction',repeat:false,controller:function(element,window){let position=0;let check=function(){let direction=window.document.documentElement.scrollTop;if(direction>position){element.classList.remove('scroll-to-top') element.classList.add('scroll-to-bottom')} else{element.classList.remove('scroll-to-bottom') diff --git a/public/dist/styles/default-ltr.css b/public/dist/styles/default-ltr.css index 21c32c8b56..61d487b9d5 100644 --- a/public/dist/styles/default-ltr.css +++ b/public/dist/styles/default-ltr.css @@ -1 +1 @@ -.pull-start{float:left}.pull-end{float:right}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-right:20px!important}.margin-start{margin-left:20px!important}.margin-end-small{margin-right:10px!important}.margin-start-small{margin-left:10px!important}.margin-end-large{margin-right:50px!important}.margin-start-large{margin-left:50px!important}.margin-end-no{margin-right:0!important}.margin-start-no{margin-left:0!important}.margin-end-negative{margin-right:-30px!important}.margin-start-negative{margin-left:-30px!important}.margin-end-negative-small{margin-right:-15px!important}.margin-start-negative-small{margin-left:-15px!important}.margin-end-negative-tiny{margin-right:-5px!important}.margin-start-negative-tiny{margin-left:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(-2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:left}.text-align-end{text-align:right}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-right:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:left;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-left:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-left:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-left:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:right}.row.wide{margin:0 -100px;padding-left:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-right:100px}.row.thin{margin:0 -20px;padding-left:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-right:20px}.row.modalize{margin:0 -30px;padding-left:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-right:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:left;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-right:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-right:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-right:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-right:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-right:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-right:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-right:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-right:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-right:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-right:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-right:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-right:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-right:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-right:50px!important;float:left;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-right:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-right:50px!important}.tiles>li:nth-child(2n){margin-right:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-right:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1645269945236);src:url(/fonts/icon.eot?t=1645269945236#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1645269945236) format("woff2"),url(/fonts/icon.woff?t=1645269945236) format("woff"),url(/fonts/icon.ttf?t=1645269945236) format('truetype'),url(/fonts/icon.svg?t=1645269945236#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-enum:before{content:"\ea25"}.icon-export:before{content:"\ea26"}.icon-eye:before{content:"\ea27"}.icon-facebook:before{content:"\ea28"}.icon-file:before{content:"\ea29"}.icon-film:before{content:"\ea2a"}.icon-filter:before{content:"\ea2b"}.icon-fire:before{content:"\ea2c"}.icon-float:before{content:"\ea2d"}.icon-folder:before{content:"\ea2e"}.icon-github:before{content:"\ea2f"}.icon-gitlab:before{content:"\ea30"}.icon-glasses:before{content:"\ea31"}.icon-google:before{content:"\ea32"}.icon-hackernews:before{content:"\ea33"}.icon-header:before{content:"\ea34"}.icon-heart:before{content:"\ea35"}.icon-home:before{content:"\ea36"}.icon-image:before{content:"\ea37"}.icon-inbox:before{content:"\ea38"}.icon-info-circled:before{content:"\ea39"}.icon-instagram:before{content:"\ea3a"}.icon-integer:before{content:"\ea3b"}.icon-ip:before{content:"\ea3c"}.icon-italic:before{content:"\ea3d"}.icon-key-inv:before{content:"\ea3e"}.icon-key:before{content:"\ea3f"}.icon-keyboard:before{content:"\ea40"}.icon-lamp:before{content:"\ea41"}.icon-left-dir:before{content:"\ea42"}.icon-left-open:before{content:"\ea43"}.icon-lifebuoy:before{content:"\ea44"}.icon-lightning:before{content:"\ea45"}.icon-link-ext:before{content:"\ea46"}.icon-link:before{content:"\ea47"}.icon-linkedin:before{content:"\ea48"}.icon-list-bullet:before{content:"\ea49"}.icon-list-numbered:before{content:"\ea4a"}.icon-list:before{content:"\ea4b"}.icon-location:before{content:"\ea4c"}.icon-lock:before{content:"\ea4d"}.icon-login:before{content:"\ea4e"}.icon-mail:before{content:"\ea4f"}.icon-medium:before{content:"\ea50"}.icon-menu:before{content:"\ea51"}.icon-minus:before{content:"\ea52"}.icon-moon-inv:before{content:"\ea53"}.icon-moon:before{content:"\ea54"}.icon-more:before{content:"\ea55"}.icon-network:before{content:"\ea56"}.icon-ok-circled:before{content:"\ea57"}.icon-ok:before{content:"\ea58"}.icon-palette:before{content:"\ea59"}.icon-pause:before{content:"\ea5a"}.icon-phone:before{content:"\ea5b"}.icon-photograph:before{content:"\ea5c"}.icon-picture:before{content:"\ea5d"}.icon-pinterest:before{content:"\ea5e"}.icon-play:before{content:"\ea5f"}.icon-plus:before{content:"\ea60"}.icon-qrcode:before{content:"\ea61"}.icon-question:before{content:"\ea62"}.icon-quote-right:before{content:"\ea63"}.icon-random:before{content:"\ea64"}.icon-reddit:before{content:"\ea65"}.icon-refresh:before{content:"\ea66"}.icon-right-dir:before{content:"\ea67"}.icon-right-open:before{content:"\ea68"}.icon-rocket:before{content:"\ea69"}.icon-search:before{content:"\ea6a"}.icon-shield:before{content:"\ea6b"}.icon-shuffle:before{content:"\ea6c"}.icon-smile-o:before{content:"\ea6d"}.icon-sort:before{content:"\ea6e"}.icon-stackoverflow:before{content:"\ea6f"}.icon-stopwatch:before{content:"\ea70"}.icon-string:before{content:"\ea71"}.icon-sun-inv:before{content:"\ea72"}.icon-telegram:before{content:"\ea73"}.icon-trash-2:before{content:"\ea74"}.icon-trash:before{content:"\ea75"}.icon-twitter:before{content:"\ea76"}.icon-underline:before{content:"\ea77"}.icon-up-dir:before{content:"\ea78"}.icon-up-open:before{content:"\ea79"}.icon-upload:before{content:"\ea7a"}.icon-user:before{content:"\ea7b"}.icon-users:before{content:"\ea7c"}.icon-videocam:before{content:"\ea7d"}.icon-warning:before{content:"\ea7e"}.icon-whatsapp:before{content:"\ea7f"}.icon-wheelchair:before{content:"\ea80"}.icon-windows:before{content:"\ea81"}.icon-wrench:before{content:"\ea82"}.icon-x:before{content:"\ea83"}.icon-youtube-play:before{content:"\ea84"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:left}::-webkit-input-placeholder{text-align:left}input:-moz-placeholder{text-align:left}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;right:30px}@media only screen and (max-width:550px){.button.fly,button.fly{right:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:left;padding:0 20px!important}.button.icon,button.icon{padding-right:30px!important}.button.icon-reduce,button.icon-reduce{padding-left:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-right:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:right 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:left 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-right:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:right;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;left:20%;margin-left:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;left:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-right:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;right:0;border-left:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-left:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-right:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-left:5px;padding-right:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-left:25px;padding-right:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:left;margin-right:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:left;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-left:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-left:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;left:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-right:0!important;margin-bottom:0!important}.upload .button{float:left;margin-right:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:left;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:left;margin-right:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;right:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-left:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-right:15px;margin-left:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;left:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;right:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.drop-list ul ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;left:30px}.drop-list ul.arrow-end:before{right:30px;left:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:left;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-right:10px;float:left}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{right:-10px;left:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-right:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:right;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-left:6px;margin-right:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:right}.switch-theme i.force-dark{float:left}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;left:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-right:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-right:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-right:50px;padding-left:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-left:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-left:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;right:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;left:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;right:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-left:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-right:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-right:30px;padding-left:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:left;margin-right:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-right:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;right:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-left:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-right:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-right:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-right:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-right:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;left:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;right:0;left:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;left:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;left:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{left:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{left:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-left:10px}article table td:last-child,article table th:last-child{padding-right:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;right:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;right:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.box ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-right:25px!important;padding-left:70px;right:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;left:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;right:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-right:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-left:50px;padding-right:30px;position:relative}.console .database .items li i{position:absolute;display:none;right:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:left;margin-right:20px!important}body>footer .copyright{padding-left:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;left:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;left:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:left;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:left}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-left:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;right:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:left;margin-right:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-right:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:ltr}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none} \ No newline at end of file +.pull-start{float:left}.pull-end{float:right}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-right:20px!important}.margin-start{margin-left:20px!important}.margin-end-small{margin-right:10px!important}.margin-start-small{margin-left:10px!important}.margin-end-large{margin-right:50px!important}.margin-start-large{margin-left:50px!important}.margin-end-no{margin-right:0!important}.margin-start-no{margin-left:0!important}.margin-end-negative{margin-right:-30px!important}.margin-start-negative{margin-left:-30px!important}.margin-end-negative-small{margin-right:-15px!important}.margin-start-negative-small{margin-left:-15px!important}.margin-end-negative-tiny{margin-right:-5px!important}.margin-start-negative-tiny{margin-left:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(-2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:left}.text-align-end{text-align:right}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-right:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:left;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-left:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-left:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-left:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:right}.row.wide{margin:0 -100px;padding-left:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-right:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-right:100px}.row.thin{margin:0 -20px;padding-left:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-right:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-right:20px}.row.modalize{margin:0 -30px;padding-left:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-right:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-right:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:left;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-right:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-right:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-right:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-right:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-right:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-right:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-right:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-right:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-right:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-right:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-right:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-right:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-right:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-right:50px!important;float:left;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-right:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-right:50px!important}.tiles>li:nth-child(2n){margin-right:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-right:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1645269945236);src:url(/fonts/icon.eot?t=1645269945236#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1645269945236) format("woff2"),url(/fonts/icon.woff?t=1645269945236) format("woff"),url(/fonts/icon.ttf?t=1645269945236) format('truetype'),url(/fonts/icon.svg?t=1645269945236#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-enum:before{content:"\ea25"}.icon-export:before{content:"\ea26"}.icon-eye:before{content:"\ea27"}.icon-facebook:before{content:"\ea28"}.icon-file:before{content:"\ea29"}.icon-film:before{content:"\ea2a"}.icon-filter:before{content:"\ea2b"}.icon-fire:before{content:"\ea2c"}.icon-float:before{content:"\ea2d"}.icon-folder:before{content:"\ea2e"}.icon-github:before{content:"\ea2f"}.icon-gitlab:before{content:"\ea30"}.icon-glasses:before{content:"\ea31"}.icon-google:before{content:"\ea32"}.icon-hackernews:before{content:"\ea33"}.icon-header:before{content:"\ea34"}.icon-heart:before{content:"\ea35"}.icon-home:before{content:"\ea36"}.icon-image:before{content:"\ea37"}.icon-inbox:before{content:"\ea38"}.icon-info-circled:before{content:"\ea39"}.icon-instagram:before{content:"\ea3a"}.icon-integer:before{content:"\ea3b"}.icon-ip:before{content:"\ea3c"}.icon-italic:before{content:"\ea3d"}.icon-key-inv:before{content:"\ea3e"}.icon-key:before{content:"\ea3f"}.icon-keyboard:before{content:"\ea40"}.icon-lamp:before{content:"\ea41"}.icon-left-dir:before{content:"\ea42"}.icon-left-open:before{content:"\ea43"}.icon-lifebuoy:before{content:"\ea44"}.icon-lightning:before{content:"\ea45"}.icon-link-ext:before{content:"\ea46"}.icon-link:before{content:"\ea47"}.icon-url:before{content:"\ea47"}.icon-linkedin:before{content:"\ea48"}.icon-list-bullet:before{content:"\ea49"}.icon-list-numbered:before{content:"\ea4a"}.icon-list:before{content:"\ea4b"}.icon-location:before{content:"\ea4c"}.icon-lock:before{content:"\ea4d"}.icon-login:before{content:"\ea4e"}.icon-mail:before{content:"\ea4f"}.icon-email:before{content:"\ea4f"}.icon-medium:before{content:"\ea50"}.icon-menu:before{content:"\ea51"}.icon-minus:before{content:"\ea52"}.icon-moon-inv:before{content:"\ea53"}.icon-moon:before{content:"\ea54"}.icon-more:before{content:"\ea55"}.icon-network:before{content:"\ea56"}.icon-ok-circled:before{content:"\ea57"}.icon-ok:before{content:"\ea58"}.icon-palette:before{content:"\ea59"}.icon-pause:before{content:"\ea5a"}.icon-phone:before{content:"\ea5b"}.icon-photograph:before{content:"\ea5c"}.icon-picture:before{content:"\ea5d"}.icon-pinterest:before{content:"\ea5e"}.icon-play:before{content:"\ea5f"}.icon-plus:before{content:"\ea60"}.icon-qrcode:before{content:"\ea61"}.icon-question:before{content:"\ea62"}.icon-quote-right:before{content:"\ea63"}.icon-random:before{content:"\ea64"}.icon-reddit:before{content:"\ea65"}.icon-refresh:before{content:"\ea66"}.icon-right-dir:before{content:"\ea67"}.icon-right-open:before{content:"\ea68"}.icon-rocket:before{content:"\ea69"}.icon-search:before{content:"\ea6a"}.icon-shield:before{content:"\ea6b"}.icon-shuffle:before{content:"\ea6c"}.icon-smile-o:before{content:"\ea6d"}.icon-sort:before{content:"\ea6e"}.icon-stackoverflow:before{content:"\ea6f"}.icon-stopwatch:before{content:"\ea70"}.icon-string:before{content:"\ea71"}.icon-sun-inv:before{content:"\ea72"}.icon-telegram:before{content:"\ea73"}.icon-trash-2:before{content:"\ea74"}.icon-trash:before{content:"\ea75"}.icon-twitter:before{content:"\ea76"}.icon-underline:before{content:"\ea77"}.icon-up-dir:before{content:"\ea78"}.icon-up-open:before{content:"\ea79"}.icon-upload:before{content:"\ea7a"}.icon-user:before{content:"\ea7b"}.icon-users:before{content:"\ea7c"}.icon-videocam:before{content:"\ea7d"}.icon-warning:before{content:"\ea7e"}.icon-whatsapp:before{content:"\ea7f"}.icon-wheelchair:before{content:"\ea80"}.icon-windows:before{content:"\ea81"}.icon-wrench:before{content:"\ea82"}.icon-x:before{content:"\ea83"}.icon-youtube-play:before{content:"\ea84"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:left}::-webkit-input-placeholder{text-align:left}input:-moz-placeholder{text-align:left}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;right:30px}@media only screen and (max-width:550px){.button.fly,button.fly{right:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:left;padding:0 20px!important}.button.icon,button.icon{padding-right:30px!important}.button.icon-reduce,button.icon-reduce{padding-left:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-right:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:right 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:left 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-right:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:right;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;left:20%;margin-left:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;left:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-right:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;right:0;border-left:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-left:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-right:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-left:5px;padding-right:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-left:25px;padding-right:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:left;margin-right:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:left;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-left:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-left:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;left:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-right:0!important;margin-bottom:0!important}.upload .button{float:left;margin-right:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:left;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:left;margin-right:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;right:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-left:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-right:15px;margin-left:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;left:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;right:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.drop-list ul ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;left:30px}.drop-list ul.arrow-end:before{right:30px;left:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:left;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-right:10px;float:left}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{right:-10px;left:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:right 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-right:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:right;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-left:6px;margin-right:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:right}.switch-theme i.force-dark{float:left}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;left:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-right:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-right:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-right:50px;padding-left:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-left:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-left:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;right:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;left:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;right:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-left:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-right:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-right:30px;padding-left:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:left;margin-right:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-right:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;right:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-left:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-right:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-right:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-right:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-right:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;left:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;right:0;left:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;left:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;left:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{left:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{left:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-left:10px}article table td:last-child,article table th:last-child{padding-right:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;right:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;right:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-left:30px;margin-right:50px}.box ul.numbers>li hr{margin-left:-60px;margin-right:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;right:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;left:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-right:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{right:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-right:25px!important;padding-left:70px;right:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;left:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;right:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-right:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-left:50px;padding-right:30px;position:relative}.console .database .items li i{position:absolute;display:none;right:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:left;margin-right:20px!important}body>footer .copyright{padding-left:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;left:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;left:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:left;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:left}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-left:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;right:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:left;margin-right:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-right:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:ltr}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none} \ No newline at end of file diff --git a/public/dist/styles/default-rtl.css b/public/dist/styles/default-rtl.css index 79740840d6..aaded501ab 100644 --- a/public/dist/styles/default-rtl.css +++ b/public/dist/styles/default-rtl.css @@ -1 +1 @@ -.pull-start{float:right}.pull-end{float:left}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-left:20px!important}.margin-start{margin-right:20px!important}.margin-end-small{margin-left:10px!important}.margin-start-small{margin-right:10px!important}.margin-end-large{margin-left:50px!important}.margin-start-large{margin-right:50px!important}.margin-end-no{margin-left:0!important}.margin-start-no{margin-right:0!important}.margin-end-negative{margin-left:-30px!important}.margin-start-negative{margin-right:-30px!important}.margin-end-negative-small{margin-left:-15px!important}.margin-start-negative-small{margin-right:-15px!important}.margin-end-negative-tiny{margin-left:-5px!important}.margin-start-negative-tiny{margin-right:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(-2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:right}.text-align-end{text-align:left}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-left:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:right;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-right:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-right:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-right:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:left}.row.wide{margin:0 -100px;padding-right:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-left:100px}.row.thin{margin:0 -20px;padding-right:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-left:20px}.row.modalize{margin:0 -30px;padding-right:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-left:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:right;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-left:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-left:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-left:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-left:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-left:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-left:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-left:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-left:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-left:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-left:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-left:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-left:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-left:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-left:50px!important;float:right;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-left:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-left:50px!important}.tiles>li:nth-child(2n){margin-left:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-left:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1645269945236);src:url(/fonts/icon.eot?t=1645269945236#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1645269945236) format("woff2"),url(/fonts/icon.woff?t=1645269945236) format("woff"),url(/fonts/icon.ttf?t=1645269945236) format('truetype'),url(/fonts/icon.svg?t=1645269945236#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-enum:before{content:"\ea25"}.icon-export:before{content:"\ea26"}.icon-eye:before{content:"\ea27"}.icon-facebook:before{content:"\ea28"}.icon-file:before{content:"\ea29"}.icon-film:before{content:"\ea2a"}.icon-filter:before{content:"\ea2b"}.icon-fire:before{content:"\ea2c"}.icon-float:before{content:"\ea2d"}.icon-folder:before{content:"\ea2e"}.icon-github:before{content:"\ea2f"}.icon-gitlab:before{content:"\ea30"}.icon-glasses:before{content:"\ea31"}.icon-google:before{content:"\ea32"}.icon-hackernews:before{content:"\ea33"}.icon-header:before{content:"\ea34"}.icon-heart:before{content:"\ea35"}.icon-home:before{content:"\ea36"}.icon-image:before{content:"\ea37"}.icon-inbox:before{content:"\ea38"}.icon-info-circled:before{content:"\ea39"}.icon-instagram:before{content:"\ea3a"}.icon-integer:before{content:"\ea3b"}.icon-ip:before{content:"\ea3c"}.icon-italic:before{content:"\ea3d"}.icon-key-inv:before{content:"\ea3e"}.icon-key:before{content:"\ea3f"}.icon-keyboard:before{content:"\ea40"}.icon-lamp:before{content:"\ea41"}.icon-left-dir:before{content:"\ea42"}.icon-left-open:before{content:"\ea43"}.icon-lifebuoy:before{content:"\ea44"}.icon-lightning:before{content:"\ea45"}.icon-link-ext:before{content:"\ea46"}.icon-link:before{content:"\ea47"}.icon-linkedin:before{content:"\ea48"}.icon-list-bullet:before{content:"\ea49"}.icon-list-numbered:before{content:"\ea4a"}.icon-list:before{content:"\ea4b"}.icon-location:before{content:"\ea4c"}.icon-lock:before{content:"\ea4d"}.icon-login:before{content:"\ea4e"}.icon-mail:before{content:"\ea4f"}.icon-medium:before{content:"\ea50"}.icon-menu:before{content:"\ea51"}.icon-minus:before{content:"\ea52"}.icon-moon-inv:before{content:"\ea53"}.icon-moon:before{content:"\ea54"}.icon-more:before{content:"\ea55"}.icon-network:before{content:"\ea56"}.icon-ok-circled:before{content:"\ea57"}.icon-ok:before{content:"\ea58"}.icon-palette:before{content:"\ea59"}.icon-pause:before{content:"\ea5a"}.icon-phone:before{content:"\ea5b"}.icon-photograph:before{content:"\ea5c"}.icon-picture:before{content:"\ea5d"}.icon-pinterest:before{content:"\ea5e"}.icon-play:before{content:"\ea5f"}.icon-plus:before{content:"\ea60"}.icon-qrcode:before{content:"\ea61"}.icon-question:before{content:"\ea62"}.icon-quote-right:before{content:"\ea63"}.icon-random:before{content:"\ea64"}.icon-reddit:before{content:"\ea65"}.icon-refresh:before{content:"\ea66"}.icon-right-dir:before{content:"\ea67"}.icon-right-open:before{content:"\ea68"}.icon-rocket:before{content:"\ea69"}.icon-search:before{content:"\ea6a"}.icon-shield:before{content:"\ea6b"}.icon-shuffle:before{content:"\ea6c"}.icon-smile-o:before{content:"\ea6d"}.icon-sort:before{content:"\ea6e"}.icon-stackoverflow:before{content:"\ea6f"}.icon-stopwatch:before{content:"\ea70"}.icon-string:before{content:"\ea71"}.icon-sun-inv:before{content:"\ea72"}.icon-telegram:before{content:"\ea73"}.icon-trash-2:before{content:"\ea74"}.icon-trash:before{content:"\ea75"}.icon-twitter:before{content:"\ea76"}.icon-underline:before{content:"\ea77"}.icon-up-dir:before{content:"\ea78"}.icon-up-open:before{content:"\ea79"}.icon-upload:before{content:"\ea7a"}.icon-user:before{content:"\ea7b"}.icon-users:before{content:"\ea7c"}.icon-videocam:before{content:"\ea7d"}.icon-warning:before{content:"\ea7e"}.icon-whatsapp:before{content:"\ea7f"}.icon-wheelchair:before{content:"\ea80"}.icon-windows:before{content:"\ea81"}.icon-wrench:before{content:"\ea82"}.icon-x:before{content:"\ea83"}.icon-youtube-play:before{content:"\ea84"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:right}::-webkit-input-placeholder{text-align:right}input:-moz-placeholder{text-align:right}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;left:30px}@media only screen and (max-width:550px){.button.fly,button.fly{left:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:right;padding:0 20px!important}.button.icon,button.icon{padding-left:30px!important}.button.icon-reduce,button.icon-reduce{padding-right:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-left:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:left 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:right 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-left:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:left;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;right:20%;margin-right:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;right:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-left:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;left:0;border-right:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-right:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-left:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-right:5px;padding-left:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-right:25px;padding-left:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:right;margin-left:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:right;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-right:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-right:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;right:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-left:0!important;margin-bottom:0!important}.upload .button{float:right;margin-left:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:right;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:right;margin-left:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;left:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-right:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-left:15px;margin-right:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;right:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;left:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.drop-list ul ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;right:30px}.drop-list ul.arrow-end:before{left:30px;right:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:right;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-left:10px;float:right}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{left:-10px;right:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-left:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:left;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-right:6px;margin-left:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:left}.switch-theme i.force-dark{float:right}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;right:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-left:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-left:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-left:50px;padding-right:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-right:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-right:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;left:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;right:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;left:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-right:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-left:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-left:30px;padding-right:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:right;margin-left:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-left:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;left:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-right:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-left:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-left:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-left:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-left:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;right:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;left:0;right:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;right:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;right:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{right:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{right:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-right:10px}article table td:last-child,article table th:last-child{padding-left:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;left:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;left:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.box ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-left:25px!important;padding-right:70px;left:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;right:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;left:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-left:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;right:0;left:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-right:50px;padding-left:30px;position:relative}.console .database .items li i{position:absolute;display:none;left:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:right;margin-left:20px!important}body>footer .copyright{padding-right:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;right:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;right:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:right;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:right}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-right:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;left:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:right;margin-left:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-left:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:rtl}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none}.icon-left-open:before{content:'\e814'!important}.icon-right-open:before{content:'\e813'!important}.icon-right-dir:before{content:'\e84e'!important}.icon-left-dir:before{content:'\e84d'!important}.icon-link-ext:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.icon-article-alt:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.copy{border-radius:10px 0 0 10px!important} \ No newline at end of file +.pull-start{float:right}.pull-end{float:left}img[src=""]{visibility:hidden;display:inline-block}:root{--config-width:910px;--config-width-xxl:1000px;--config-width-xl:910px;--config-width-large:700px;--config-width-medium:550px;--config-width-small:320px;--config-color-primary:#f02e65;--config-color-link:#1e849e;--config-color-background:#eceff1;--config-color-background-dark:#dfe2e4;--config-color-background-fade:#ffffff;--config-color-background-fade-super:#fdfdfd;--config-color-background-focus:#f5f5f5;--config-color-background-input:#ffffff;--config-color-placeholder:#868686;--config-color-tooltip-text:#dce8f5;--config-color-tooltip-background:#333333;--config-color-focus:#f02e65;--config-color-focus-fade:#fef8fa;--config-color-focus-hover:#ff729b;--config-color-focus-glow:#fce5ec;--config-color-focus-dark:#c52653;--config-color-normal:#40404c;--config-color-dark:#313131;--config-color-fade:#8f8f8f;--config-color-fade-dark:#6e6e6e;--config-color-fade-light:#e2e2e2;--config-color-fade-super:#f1f3f5;--config-color-danger:#f53d3d;--config-color-success:#1bbf61;--config-color-warning:#fffbdd;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#d4f0f7;--config-border-color:#f3f3f3;--config-border-fade:#e0e3e4;--config-border-fade-super:#f7f7f7;--config-border-radius:10px;--config-prism-background:#373738;--config-prism-numbers:#39393c;--config-note-background:#f1fbff;--config-note-border:#5bceff;--config-warning-background:#fdf7d9;--config-warning-border:#f8e380;--config-social-twitter:#1da1f2;--config-social-github:#000000;--config-social-discord:#7189dc;--config-social-facebook:#4070b4;--config-language-bash:#2b2626;--config-language-bash-contrast:#fff;--config-language-javascript:#fff054;--config-language-javascript-contrast:#333232;--config-language-web:#fff054;--config-language-web-contrast:#333232;--config-language-html:#ff895b;--config-language-html-contrast:#ffffff;--config-language-yaml:#ca3333;--config-language-yaml-contrast:#ffffff;--config-language-php:#6182bb;--config-language-php-contrast:#ffffff;--config-language-nodejs:#8cc500;--config-language-nodejs-contrast:#ffffff;--config-language-ruby:#fc3f48;--config-language-ruby-contrast:#ffffff;--config-language-python:#3873a2;--config-language-python-contrast:#ffffff;--config-language-go:#00add8;--config-language-go-contrast:#ffffff;--config-language-dart:#035698;--config-language-dart-contrast:#ffffff;--config-language-flutter:#035698;--config-language-flutter-contrast:#ffffff;--config-language-android:#a4c439;--config-language-android-contrast:#ffffff;--config-language-kotlin:#766DB2;--config-language-kotlin-contrast:#ffffff;--config-language-swift:#f2624c;--config-language-swift-contrast:#ffffff;--config-language-java:#0074bd;--config-language-java-contrast:#ffffff;--config-modal-note-background:#f5fbff;--config-modal-note-border:#eaf2f7;--config-modal-note-color:#3b5d73;--config-switch-background:#e2e2e2;--config-console-background:#eceff1;--config-console-nav-start:#143650;--config-console-nav-end:#302839;--config-console-nav-border:#2a253a;--config-console-nav-switch-background:#ececec;--config-console-nav-switch-color:#868686;--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,");--config-defalut-color-hsl:0 0% 62%;--config-disabled-color-hsl:0 0% 62%;--config-pending-color-hsl:36 100% 47%;--config-failed-color-hsl:0 74% 42%}:root .theme-dark{--config-color-primary:#f02e65;--config-color-background:#061F2F;--config-color-background-dark:#262d50;--config-color-background-fade:#1c223a;--config-color-background-fade-super:#1a1f35;--config-color-background-focus:#1a1f35;--config-color-background-input:#dce8f5;--config-color-tooltip-text:#061F2F;--config-color-tooltip-background:#dce8f5;--config-color-link:#4caedb;--config-color-placeholder:#9ea1af;--config-color-focus:#c7d8eb;--config-color-focus-fade:#1e233e;--config-color-focus-hover:#d3deea;--config-color-focus-glow:#d3deea;--config-color-focus-dark:#657586;--config-color-normal:#c7d8eb;--config-color-dark:#c7d8eb;--config-color-fade:#bec3e0;--config-color-fade-dark:#81859b;--config-color-fade-light:#181818;--config-color-fade-super:#262D50;--config-color-danger:#d84a4a;--config-color-success:#34b86d;--config-color-warning:#e0d56d;--config-color-info:#386fd2;--config-color-chart:#29b5d9;--config-color-chart-fade:#c7d8eb;--config-border-color:#262D50;--config-border-fade:#19203a;--config-border-fade-super:#262D50;--config-prism-background:#1F253F;--config-prism-numbers:#1F253F;--config-note-background:#171e33;--config-note-border:#262D50;--config-warning-background:#1F253F;--config-warning-border:#262D50;--config-social-twitter:var(--config-color-normal);--config-social-github:var(--config-color-normal);--config-social-discord:var(--config-color-normal);--config-social-facebook:var(--config-color-normal);--config-language-bash:var(--config-color-normal);--config-language-bash-contrast:var(--config-color-background);--config-language-javascript:var(--config-color-normal);--config-language-javascript-contrast:var(--config-color-background);--config-language-web:var(--config-color-normal);--config-language-web-contrast:var(--config-color-background);--config-language-yaml:var(--config-color-normal);--config-language-yaml-contrast:var(--config-color-background);--config-language-html:var(--config-color-normal);--config-language-html-contrast:var(--config-color-background);--config-language-php:var(--config-color-normal);--config-language-php-contrast:var(--config-color-background);--config-language-nodejs:var(--config-color-normal);--config-language-nodejs-contrast:var(--config-color-background);--config-language-ruby:var(--config-color-normal);--config-language-ruby-contrast:var(--config-color-background);--config-language-python:var(--config-color-normal);--config-language-python-contrast:var(--config-color-background);--config-language-go:var(--config-color-normal);--config-language-go-contrast:var(--config-color-background);--config-language-dart:var(--config-color-normal);--config-language-dart-contrast:var(--config-color-background);--config-language-flutter:var(--config-color-normal);--config-language-flutter-contrast:var(--config-color-background);--config-language-android:var(--config-color-normal);--config-language-android-contrast:var(--config-color-background);--config-language-kotlin:var(--config-color-normal);--config-language-kotlin-contrast:var(--config-color-background);--config-language-swift:var(--config-color-normal);--config-language-swift-contrast:var(--config-color-background);--config-language-java:var(--config-color-normal);--config-language-java-contrast:var(--config-color-background);--config-modal-note-background:#15192b;--config-modal-note-border:#161b31;--config-modal-note-color:var(--config-color-normal);--config-switch-background:var(--config-color-normal);--config-console-background:#20263f;--config-console-nav-start:#1c2139;--config-console-nav-end:#151929;--config-console-nav-border:#171b30;--config-console-nav-switch-background:var(--config-color-focus);--config-console-nav-switch-color:var(--config-color-background);--config-console-nav-switch-arrow:url("data:image/svg+xml;utf8,")}.theme-light .force-light{display:block!important}.theme-dark .force-dark{display:block!important}.force-dark{display:none!important}.force-light{display:none!important}@font-face{font-family:Poppins;font-style:normal;font-weight:100;src:url(/fonts/poppins-v9-latin-100.eot);src:local('Poppins Thin'),local('Poppins-Thin'),url(/fonts/poppins-v9-latin-100.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-100.woff2) format('woff2'),url(/fonts/poppins-v9-latin-100.woff) format('woff'),url(/fonts/poppins-v9-latin-100.ttf) format('truetype'),url(/fonts/poppins-v9-latin-100.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:300;src:url(/fonts/poppins-v9-latin-300.eot);src:local('Poppins Light'),local('Poppins-Light'),url(/fonts/poppins-v9-latin-300.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-300.woff2) format('woff2'),url(/fonts/poppins-v9-latin-300.woff) format('woff'),url(/fonts/poppins-v9-latin-300.ttf) format('truetype'),url(/fonts/poppins-v9-latin-300.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:400;src:url(/fonts/poppins-v9-latin-regular.eot);src:local('Poppins Regular'),local('Poppins-Regular'),url(/fonts/poppins-v9-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-regular.woff2) format('woff2'),url(/fonts/poppins-v9-latin-regular.woff) format('woff'),url(/fonts/poppins-v9-latin-regular.ttf) format('truetype'),url(/fonts/poppins-v9-latin-regular.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:500;src:url(/fonts/poppins-v9-latin-500.eot);src:local('Poppins Medium'),local('Poppins-Medium'),url(/fonts/poppins-v9-latin-500.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-500.woff2) format('woff2'),url(/fonts/poppins-v9-latin-500.woff) format('woff'),url(/fonts/poppins-v9-latin-500.ttf) format('truetype'),url(/fonts/poppins-v9-latin-500.svg#Poppins) format('svg')}@font-face{font-family:Poppins;font-style:normal;font-weight:600;src:url(/fonts/poppins-v9-latin-600.eot);src:local('Poppins SemiBold'),local('Poppins-SemiBold'),url(/fonts/poppins-v9-latin-600.eot?#iefix) format('embedded-opentype'),url(/fonts/poppins-v9-latin-600.woff2) format('woff2'),url(/fonts/poppins-v9-latin-600.woff) format('woff'),url(/fonts/poppins-v9-latin-600.ttf) format('truetype'),url(/fonts/poppins-v9-latin-600.svg#Poppins) format('svg')}@font-face{font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url(/fonts/source-code-pro-v11-latin-regular.eot);src:local('Source Code Pro Regular'),local('SourceCodePro-Regular'),url(/fonts/source-code-pro-v11-latin-regular.eot?#iefix) format('embedded-opentype'),url(/fonts/source-code-pro-v11-latin-regular.woff2) format('woff2'),url(/fonts/source-code-pro-v11-latin-regular.woff) format('woff'),url(/fonts/source-code-pro-v11-latin-regular.ttf) format('truetype'),url(/fonts/source-code-pro-v11-latin-regular.svg#SourceCodePro) format('svg')}.padding{padding:30px}.padding-top{padding-top:30px!important}.padding-top-large{padding-top:50px!important}.padding-top-xl{padding-top:80px!important}.padding-bottom{padding-bottom:30px!important}.padding-bottom-large{padding-bottom:50px!important}.padding-bottom-xl{padding-bottom:80px!important}.margin-end{margin-left:20px!important}.margin-start{margin-right:20px!important}.margin-end-small{margin-left:10px!important}.margin-start-small{margin-right:10px!important}.margin-end-large{margin-left:50px!important}.margin-start-large{margin-right:50px!important}.margin-end-no{margin-left:0!important}.margin-start-no{margin-right:0!important}.margin-end-negative{margin-left:-30px!important}.margin-start-negative{margin-right:-30px!important}.margin-end-negative-small{margin-left:-15px!important}.margin-start-negative-small{margin-right:-15px!important}.margin-end-negative-tiny{margin-left:-5px!important}.margin-start-negative-tiny{margin-right:-5px!important}.margin-top{margin-top:30px!important}.margin-bottom{margin-bottom:30px!important}.margin-top-no{margin-top:0!important}.margin-bottom-no{margin-bottom:0!important}.margin-top-xxl{margin-top:140px!important}.margin-top-xl{margin-top:80px!important}.margin-top-large{margin-top:50px!important}.margin-top-small{margin-top:15px!important}.margin-top-tiny{margin-top:5px!important}.margin-top-negative{margin-top:-30px!important}.margin-top-negative-tiny{margin-top:-5px!important}.margin-top-negative-small{margin-top:-15px!important}.margin-top-negative-large{margin-top:-50px!important}.margin-top-negative-xl{margin-top:-80px!important}.margin-top-negative-xxl{margin-top:-100px!important}.margin-top-negative-xxxl{margin-top:-150px!important}.margin-bottom-xxl{margin-bottom:140px!important}.margin-bottom-xl{margin-bottom:80px!important}.margin-bottom-large{margin-bottom:50px!important}.margin-bottom-small{margin-bottom:15px!important}.margin-bottom-tiny{margin-bottom:5px!important}.margin-bottom-negative{margin-bottom:-30px!important}.margin-bottom-negative-tiny{margin-bottom:-5px!important}.margin-bottom-negative-small{margin-bottom:-15px!important}.margin-bottom-negative-large{margin-bottom:-50px!important}.margin-bottom-negative-xl{margin-bottom:-80px!important}.margin-bottom-negative-xl{margin-bottom:-100px!important}.force-left,.ide{direction:ltr;text-align:left}.force-right{direction:rtl;text-align:right}.pull-left{float:left}.pull-right{float:right}.ratio-wide{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-wide>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-square{height:0;overflow:hidden;padding-top:56%;position:relative;width:100%}.ratio-square>*{position:absolute;top:0;left:0;width:100%;height:100%}.clear:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.phones-only{display:none}@media only screen and (max-width:550px){.phones-only{display:inherit!important}}.tablets-only{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only{display:inherit!important}}.desktops-only{display:none}@media only screen and (min-width:1199px){.desktops-only{display:inherit!important}}.phones-only-inline{display:none}@media only screen and (max-width:550px){.phones-only-inline{display:inline-block!important}}.tablets-only-inline{display:none}@media only screen and (min-width:551px) and (max-width:1198px){.tablets-only-inline{display:inline-block!important}}.desktops-only-inline{display:none}@media only screen and (min-width:1199px){.desktops-only-inline{display:inline-block!important}}*{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;font-weight:300}h1,h2,h3,h4,h5,h6{margin:0}h4,h5,h6{font-weight:400}.link,a{color:var(--config-color-link);text-decoration:none;border-left:2px solid transparent;border-right:2px solid transparent;transition:.2s;cursor:pointer}.link.disabled,a.disabled{opacity:.5}.link.tag:hover,a.tag:hover{opacity:.9}.link.danger,a.danger{color:var(--config-color-danger)}.link.link-animation-enabled,a.link-animation-enabled{display:inline-flex}.link.link-animation-enabled:hover,a.link-animation-enabled:hover{transform:translateY(-2px)}.link-return-animation--start>i{display:inline-block;transition:.2s}.link-return-animation--start:hover>i{transform:translateX(2px)}.link-return-animation--end>i{display:inline-block;transition:.2s}.link-return-animation--end:hover>i{transform:translateX(-2px)}b,strong{font-weight:500}p{margin:0 0 20px 0;line-height:26px}small{font-size:16px;color:var(--config-color-fade)}.text-size-small{font-size:13px}.text-size-smaller{font-size:11.5px}.text-size-xs{font-size:10px}.text-size-normal{font-size:16px}.text-height-large{height:30px;line-height:30px}.text-height-small{line-height:13px}.text-one-liner{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-bold{font-weight:400!important}.text-bold-large{font-weight:500!important}.text-bold-xl{font-weight:600!important}.text-danger{color:var(--config-color-danger)!important}.text-success{color:var(--config-color-success)!important}.text-upper{text-transform:uppercase}.text-warning{color:var(--config-color-warning)}.text-focus{color:var(--config-color-focus)}.text-fade{color:var(--config-color-fade)}.text-fade-dark{color:var(--config-color-fade-dark)}.text-green{color:var(--config-color-success)}.text-red{color:var(--config-color-danger)}.text-info{color:var(--config-color-info)}.text-yellow{color:#ffe28b}.text-disclaimer{font-size:11px;color:var(--config-color-fade)}.text-fade-extra{color:var(--config-color-fade);opacity:.5}.text-line-high-large{line-height:30px}.text-line-high-xl{line-height:40px}.text-sign{margin:5px 0;font-size:25px;width:25px;height:25px;line-height:25px;display:inline-block}.text-align-center{text-align:center}.text-align-start{text-align:right}.text-align-end{text-align:left}.text-align-left{text-align:left}.text-align-right{text-align:right}.text-dir-ltr{direction:ltr;display:inline-block}.text-dir-rtl{direction:rtl;display:inline-block}i[class*=' icon-']:before,i[class^=icon-]:before{display:inline;line-height:unset}table{width:calc(100% + 60px);border-collapse:collapse;margin:-30px;border-radius:10px;overflow:hidden;position:relative;table-layout:fixed}table.y-scroll{overflow-y:auto}table.multi-line tbody td,table.multi-line thead th{line-height:inherit;text-overflow:inherit;white-space:inherit}table.borders td,table.borders th{border-left:solid 1px var(--config-border-fade-super)}table.borders td:last-child,table.borders th:last-child{border:none}table thead{border-bottom:solid 1px var(--config-color-fade-super);font-size:14px}table.small{font-size:14px}table.open-end tbody tr:last-child{border-bottom:none;font-weight:700;background:#f7fbf7}table.full tbody td,table.full tbody th{vertical-align:top;white-space:normal;overflow:auto;line-height:24px;padding-top:20px;padding-bottom:20px;height:auto}table .avatar{width:30px;height:30px}table tr{border-bottom:solid 1px var(--config-color-fade-super)}table tr:last-child{border-bottom:none}table tr:last-child td:first-child{border-bottom-left-radius:6px}table tr:last-child td:last-child{border-bottom-right-radius:6px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table tr:nth-child(even){background:var(--config-color-background-fade-super)}}@media only screen and (min-width:1199px){table tr:nth-child(even) td{background:var(--config-color-background-fade-super)}}table tr.selected{background:var(--config-note-background)}table tr.selected td,table tr.selected td span{font-weight:500}table th{text-align:right;font-weight:400}table th i{color:var(--config-color-fade);font-size:10px;display:inline-block;vertical-align:top;line-height:16px;padding:0 3px}table td,table th{height:65px;padding:0 15px;line-height:50px}table td:first-child,table th:first-child{padding-right:30px}table td,table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){table.vertical{border-top:solid 1px var(--config-color-fade-super);display:block;overflow:hidden;padding-top:12px}table.vertical .hide{display:none}table.vertical tbody,table.vertical td,table.vertical th,table.vertical thead,table.vertical tr{width:100%;display:block}table.vertical tr{position:relative}table.vertical th,table.vertical tr{padding-top:12px;padding-bottom:12px}table.vertical th:first-child,table.vertical tr:first-child{padding-top:0}table.vertical td,table.vertical th{padding:5px 20px!important;text-overflow:ellipsis;white-space:normal;height:40px;line-height:40px;width:calc(100% - 40px)}table.vertical td.col-name,table.vertical th.col-name{width:calc(100% - 110px)}table.vertical td:first-child,table.vertical td:last-child,table.vertical th:first-child,table.vertical th:last-child{padding:0 10px}table.vertical td:last-child,table.vertical th:last-child{padding-bottom:0}table.vertical td p,table.vertical th p{display:inline-block;width:calc(100% - 40px)}table.vertical td:not([data-title=""]):before{content:attr(data-title);margin-right:4px;font-weight:400}table.vertical thead{display:none}table.vertical .cell-options-more{position:absolute;inset-block-start:0;inset-inline-end:0;width:auto}}table .trim-inner-text{display:inline-flex;align-items:center;gap:8px}@media only screen and (min-width:1199px){table .trim-inner-text{width:100%}}table .cell-options-more button{padding:0 12px;background-color:transparent;color:var(--config-color-fade)}table .cell-options-more button:focus-visible{outline:solid 1px var(--config-color-focus)}.zone{max-width:var(--config-width-xl);margin:0 auto 40px auto}.zone.xxxl{max-width:calc(1400px - 100px)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.zone.xxxl{max-width:100%}}.zone.xxl{max-width:var(--config-width-xxl)}.zone.xl{max-width:var(--config-width-xl)}.zone.large{max-width:var(--config-width-large)}.zone.medium{max-width:var(--config-width-medium)}.zone.small{max-width:var(--config-width-small)}.row{position:relative;margin:0 -50px;padding-right:50px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row{margin:0 -30px;padding-right:30px}}.row.force-ltr>.col{float:left}.row.force-rtl>.col{float:right}.row.force-reverse>.col{float:left}.row.wide{margin:0 -100px;padding-right:100px}.row.wide>.span-1{width:calc(8.33333333% * 1 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-2{width:calc(8.33333333% * 2 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-3{width:calc(8.33333333% * 3 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-4{width:calc(8.33333333% * 4 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-5{width:calc(8.33333333% * 5 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-6{width:calc(8.33333333% * 6 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-7{width:calc(8.33333333% * 7 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-8{width:calc(8.33333333% * 8 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-9{width:calc(8.33333333% * 9 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-10{width:calc(8.33333333% * 10 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-11{width:calc(8.33333333% * 11 - 100px);box-sizing:content-box;padding-left:100px}.row.wide>.span-12{width:calc(8.33333333% * 12 - 100px);box-sizing:content-box;padding-left:100px}.row.thin{margin:0 -20px;padding-right:20px}.row.thin>.span-1{width:calc(8.33333333% * 1 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-2{width:calc(8.33333333% * 2 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-3{width:calc(8.33333333% * 3 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-4{width:calc(8.33333333% * 4 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-5{width:calc(8.33333333% * 5 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-6{width:calc(8.33333333% * 6 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-7{width:calc(8.33333333% * 7 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-8{width:calc(8.33333333% * 8 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-9{width:calc(8.33333333% * 9 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-10{width:calc(8.33333333% * 10 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-11{width:calc(8.33333333% * 11 - 20px);box-sizing:content-box;padding-left:20px}.row.thin>.span-12{width:calc(8.33333333% * 12 - 20px);box-sizing:content-box;padding-left:20px}.row.modalize{margin:0 -30px;padding-right:30px}.row.modalize>.span-1{width:calc(8.33333333% * 1 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-2{width:calc(8.33333333% * 2 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-3{width:calc(8.33333333% * 3 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-4{width:calc(8.33333333% * 4 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-5{width:calc(8.33333333% * 5 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-6{width:calc(8.33333333% * 6 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-7{width:calc(8.33333333% * 7 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-8{width:calc(8.33333333% * 8 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-9{width:calc(8.33333333% * 9 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-10{width:calc(8.33333333% * 10 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-11{width:calc(8.33333333% * 11 - 30px);box-sizing:content-box;padding-left:30px}.row.modalize>.span-12{width:calc(8.33333333% * 12 - 30px);box-sizing:content-box;padding-left:30px}.row:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.row .col{float:right;box-sizing:border-box}.row .col.sticky-top{position:sticky;top:90px}.row .col.sticky-bottom{position:sticky;bottom:0}.row .span-1{width:calc(8.33333333% * 1 - 40px);box-sizing:content-box;padding-left:40px}.row .span-2{width:calc(8.33333333% * 2 - 40px);box-sizing:content-box;padding-left:40px}.row .span-3{width:calc(8.33333333% * 3 - 40px);box-sizing:content-box;padding-left:40px}.row .span-4{width:calc(8.33333333% * 4 - 40px);box-sizing:content-box;padding-left:40px}.row .span-5{width:calc(8.33333333% * 5 - 40px);box-sizing:content-box;padding-left:40px}.row .span-6{width:calc(8.33333333% * 6 - 40px);box-sizing:content-box;padding-left:40px}.row .span-7{width:calc(8.33333333% * 7 - 40px);box-sizing:content-box;padding-left:40px}.row .span-8{width:calc(8.33333333% * 8 - 40px);box-sizing:content-box;padding-left:40px}.row .span-9{width:calc(8.33333333% * 9 - 40px);box-sizing:content-box;padding-left:40px}.row .span-10{width:calc(8.33333333% * 10 - 40px);box-sizing:content-box;padding-left:40px}.row .span-11{width:calc(8.33333333% * 11 - 40px);box-sizing:content-box;padding-left:40px}.row .span-12{width:calc(8.33333333% * 12 - 40px);box-sizing:content-box;padding-left:40px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.row.responsive{width:100%;padding:0;margin:0}.row.responsive>.span-1,.row.responsive>.span-10,.row.responsive>.span-11,.row.responsive>.span-12,.row.responsive>.span-2,.row.responsive>.span-3,.row.responsive>.span-4,.row.responsive>.span-5,.row.responsive>.span-6,.row.responsive>.span-7,.row.responsive>.span-8,.row.responsive>.span-9{width:calc(8.33333333% * 12 - 0px)!important;box-sizing:content-box!important;padding-left:0!important;width:100%!important}}.tiles{position:relative}.tiles:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.tiles .box hr{margin:15px -15px}.tiles>*{margin-left:50px!important;float:right;width:calc(33.3333% - 33.3333px)}.tiles>* .photo-title{width:calc(100% + 30px);height:15px;margin:-15px -15px 10px -15px;border-radius:10px 10px 0 0;background:var(--config-color-fade-super);border-bottom:solid 1px var(--config-color-fade-super)}.tiles>:nth-child(3n){margin-left:0!important}@media only screen and (min-width:551px) and (max-width:1198px){.tiles>li{width:calc(50% - 25px)}.tiles>li:nth-child(3n){margin-left:50px!important}.tiles>li:nth-child(2n){margin-left:0!important}}@media only screen and (max-width:550px){.tiles>li{width:100%;margin-left:0!important}}@font-face{font-family:icon;src:url(/fonts/icon.eot?t=1645269945236);src:url(/fonts/icon.eot?t=1645269945236#iefix) format('embedded-opentype'),url(/fonts/icon.woff2?t=1645269945236) format("woff2"),url(/fonts/icon.woff?t=1645269945236) format("woff"),url(/fonts/icon.ttf?t=1645269945236) format('truetype'),url(/fonts/icon.svg?t=1645269945236#icon) format('svg');font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:icon!important;font-style:normal;font-weight:400;speak:never;vertical-align:middle;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-angle-circled-left:before{content:"\ea01"}.icon-angle-circled-right:before{content:"\ea02"}.icon-archive:before{content:"\ea03"}.icon-article:before{content:"\ea04"}.icon-asterisk:before{content:"\ea05"}.icon-bank:before{content:"\ea06"}.icon-bell:before{content:"\ea07"}.icon-binoculars:before{content:"\ea08"}.icon-bitbucket:before{content:"\ea09"}.icon-bold:before{content:"\ea0a"}.icon-book-open:before{content:"\ea0b"}.icon-boolean:before{content:"\ea0c"}.icon-briefcase:before{content:"\ea0d"}.icon-building-filled:before{content:"\ea0e"}.icon-calendar:before{content:"\ea0f"}.icon-cancel-circled:before{content:"\ea10"}.icon-cancel:before{content:"\ea11"}.icon-chart-area:before{content:"\ea12"}.icon-chat-alt:before{content:"\ea13"}.icon-check:before{content:"\ea14"}.icon-chevron-down:before{content:"\ea15"}.icon-clock:before{content:"\ea16"}.icon-code:before{content:"\ea17"}.icon-cog:before{content:"\ea18"}.icon-comment:before{content:"\ea19"}.icon-database:before{content:"\ea1a"}.icon-dev:before{content:"\ea1b"}.icon-discord:before{content:"\ea1c"}.icon-docs:before{content:"\ea1d"}.icon-dot-3:before{content:"\ea1e"}.icon-dot-circled:before{content:"\ea1f"}.icon-double:before{content:"\ea20"}.icon-down-dir:before{content:"\ea21"}.icon-down-open:before{content:"\ea22"}.icon-download:before{content:"\ea23"}.icon-edit:before{content:"\ea24"}.icon-enum:before{content:"\ea25"}.icon-export:before{content:"\ea26"}.icon-eye:before{content:"\ea27"}.icon-facebook:before{content:"\ea28"}.icon-file:before{content:"\ea29"}.icon-film:before{content:"\ea2a"}.icon-filter:before{content:"\ea2b"}.icon-fire:before{content:"\ea2c"}.icon-float:before{content:"\ea2d"}.icon-folder:before{content:"\ea2e"}.icon-github:before{content:"\ea2f"}.icon-gitlab:before{content:"\ea30"}.icon-glasses:before{content:"\ea31"}.icon-google:before{content:"\ea32"}.icon-hackernews:before{content:"\ea33"}.icon-header:before{content:"\ea34"}.icon-heart:before{content:"\ea35"}.icon-home:before{content:"\ea36"}.icon-image:before{content:"\ea37"}.icon-inbox:before{content:"\ea38"}.icon-info-circled:before{content:"\ea39"}.icon-instagram:before{content:"\ea3a"}.icon-integer:before{content:"\ea3b"}.icon-ip:before{content:"\ea3c"}.icon-italic:before{content:"\ea3d"}.icon-key-inv:before{content:"\ea3e"}.icon-key:before{content:"\ea3f"}.icon-keyboard:before{content:"\ea40"}.icon-lamp:before{content:"\ea41"}.icon-left-dir:before{content:"\ea42"}.icon-left-open:before{content:"\ea43"}.icon-lifebuoy:before{content:"\ea44"}.icon-lightning:before{content:"\ea45"}.icon-link-ext:before{content:"\ea46"}.icon-link:before{content:"\ea47"}.icon-url:before{content:"\ea47"}.icon-linkedin:before{content:"\ea48"}.icon-list-bullet:before{content:"\ea49"}.icon-list-numbered:before{content:"\ea4a"}.icon-list:before{content:"\ea4b"}.icon-location:before{content:"\ea4c"}.icon-lock:before{content:"\ea4d"}.icon-login:before{content:"\ea4e"}.icon-mail:before{content:"\ea4f"}.icon-email:before{content:"\ea4f"}.icon-medium:before{content:"\ea50"}.icon-menu:before{content:"\ea51"}.icon-minus:before{content:"\ea52"}.icon-moon-inv:before{content:"\ea53"}.icon-moon:before{content:"\ea54"}.icon-more:before{content:"\ea55"}.icon-network:before{content:"\ea56"}.icon-ok-circled:before{content:"\ea57"}.icon-ok:before{content:"\ea58"}.icon-palette:before{content:"\ea59"}.icon-pause:before{content:"\ea5a"}.icon-phone:before{content:"\ea5b"}.icon-photograph:before{content:"\ea5c"}.icon-picture:before{content:"\ea5d"}.icon-pinterest:before{content:"\ea5e"}.icon-play:before{content:"\ea5f"}.icon-plus:before{content:"\ea60"}.icon-qrcode:before{content:"\ea61"}.icon-question:before{content:"\ea62"}.icon-quote-right:before{content:"\ea63"}.icon-random:before{content:"\ea64"}.icon-reddit:before{content:"\ea65"}.icon-refresh:before{content:"\ea66"}.icon-right-dir:before{content:"\ea67"}.icon-right-open:before{content:"\ea68"}.icon-rocket:before{content:"\ea69"}.icon-search:before{content:"\ea6a"}.icon-shield:before{content:"\ea6b"}.icon-shuffle:before{content:"\ea6c"}.icon-smile-o:before{content:"\ea6d"}.icon-sort:before{content:"\ea6e"}.icon-stackoverflow:before{content:"\ea6f"}.icon-stopwatch:before{content:"\ea70"}.icon-string:before{content:"\ea71"}.icon-sun-inv:before{content:"\ea72"}.icon-telegram:before{content:"\ea73"}.icon-trash-2:before{content:"\ea74"}.icon-trash:before{content:"\ea75"}.icon-twitter:before{content:"\ea76"}.icon-underline:before{content:"\ea77"}.icon-up-dir:before{content:"\ea78"}.icon-up-open:before{content:"\ea79"}.icon-upload:before{content:"\ea7a"}.icon-user:before{content:"\ea7b"}.icon-users:before{content:"\ea7c"}.icon-videocam:before{content:"\ea7d"}.icon-warning:before{content:"\ea7e"}.icon-whatsapp:before{content:"\ea7f"}.icon-wheelchair:before{content:"\ea80"}.icon-windows:before{content:"\ea81"}.icon-wrench:before{content:"\ea82"}.icon-x:before{content:"\ea83"}.icon-youtube-play:before{content:"\ea84"}.datalist-polyfill{list-style:none;display:none;background:#fff;box-shadow:0 2px 2px #999;position:absolute;left:0;top:0;margin:0;padding:0;max-height:300px;overflow-y:auto}.datalist-polyfill:empty{display:none!important}.datalist-polyfill>li{padding:3px;font:13px "Lucida Grande",Sans-Serif}.datalist-polyfill__active{background:#3875d7;color:#fff}date-input-polyfill{z-index:1000!important;max-width:320px!important;width:320px!important}date-input-polyfill .monthSelect-wrapper,date-input-polyfill .yearSelect-wrapper{height:50px;line-height:50px;padding:0;width:40%!important;margin-bottom:10px!important}date-input-polyfill .monthSelect-wrapper select,date-input-polyfill .yearSelect-wrapper select{padding:0 12px;height:50px;line-height:50px;box-sizing:border-box}date-input-polyfill .yearSelect-wrapper{width:35%!important}date-input-polyfill table{width:100%!important;max-width:100%!important;padding:0 12px 12px 12px!important;box-sizing:border-box;margin:0}date-input-polyfill table td:first-child,date-input-polyfill table td:last-child,date-input-polyfill table th:first-child,date-input-polyfill table th:last-child{width:32px!important;padding:4px!important}date-input-polyfill select{margin-bottom:10px}date-input-polyfill button{width:25%!important;height:50px!important;line-height:50px!important;margin-bottom:10px!important;background:inherit;position:relative;color:inherit;padding:inherit;box-sizing:inherit;border-radius:inherit;font-size:inherit;box-shadow:none;border:none;border-bottom:none!important}::placeholder{color:var(--config-color-placeholder);text-align:right}::-webkit-input-placeholder{text-align:right}input:-moz-placeholder{text-align:right}form.inline{display:inline-block}input,textarea{background:var(--config-color-background-input)}input[type=file],input[type=file]::-webkit-file-upload-button{cursor:pointer}.button,button{display:inline-block;background:var(--config-color-focus);border-radius:26px;border:none;color:var(--config-color-background-fade);height:52px;line-height:52px;padding:0 25px;cursor:pointer;font-size:16px;box-sizing:border-box;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button:focus,.button:hover,button:focus,button:hover{background:var(--config-color-focus-hover)}.button.fly,button.fly{position:fixed;z-index:2;bottom:30px;left:30px}@media only screen and (max-width:550px){.button.fly,button.fly{left:15px}}.button.fill,button.fill{display:block;width:100%;text-align:center;padding:0 10px!important}.button.fill-aligned,button.fill-aligned{display:block;width:100%;text-align:right;padding:0 20px!important}.button.icon,button.icon{padding-left:30px!important}.button.icon-reduce,button.icon-reduce{padding-right:15px!important}.button.reverse,button.reverse{background:0 0;height:50px;line-height:48px;padding:0 23px;color:var(--config-color-focus);border:solid 2px var(--config-color-focus)}.button.reverse:focus,.button.reverse:hover,button.reverse:focus,button.reverse:hover{color:var(--config-color-focus-hover);border-color:var(--config-color-focus-hover)}.button.small,button.small{padding:0 15px;height:40px;line-height:36px;font-size:13px}.button.tick,button.tick{background:var(--config-color-fade-light);color:var(--config-color-dark);border-radius:20px;padding:0 10px;line-height:30px;height:30px;font-size:12px;display:inline-block}.button.tick.selected,button.tick.selected{background:var(--config-color-dark);color:var(--config-color-fade)}.button.round,button.round{width:52px;padding:0}.button.round.small,button.round.small{font-size:12px;width:30px;height:30px;line-height:30px}.button.white,button.white{background:#fff;color:var(--config-color-focus)}.button.white.reverse,button.white.reverse{color:#fff;background:0 0;border:solid 2px #fff}.button.trans,button.trans{background:0 0!important}.button.trans.reverse,button.trans.reverse{background:0 0!important}.button.success,button.success{background:var(--config-color-success)}.button.success.reverse,button.success.reverse{color:var(--config-color-success);background:#fff;border:solid 2px var(--config-color-success)}.button.danger,button.danger{background:var(--config-color-danger);color:#fff}.button.danger.reverse,button.danger.reverse{color:var(--config-color-danger);background:var(--config-color-background-fade);border:solid 2px var(--config-color-danger)}.button.dark,button.dark{background:var(--config-color-dark);color:var(--config-color-background-fade)}.button.dark.reverse,button.dark.reverse{color:var(--config-color-dark);background:var(--config-color-background-fade);border:solid 2px var(--config-color-dark)}.button .disabled,.button.disabled,.button:disabled,button .disabled,button.disabled,button:disabled{color:var(--config-color-normal);background:var(--config-color-background-dark);opacity:.6;cursor:default}.button.link,button.link{background:0 0;border-radius:0;color:var(--config-color-link);height:auto;line-height:normal;padding:0;padding-left:0!important}.button.link:focus,button.link:focus{box-shadow:inherit}.button.strip,button.strip{background:0 0;height:auto;line-height:16px;color:inherit;padding:0 5px}.button.facebook,button.facebook{color:#fff!important;background:#4070b4!important}.button.twitter,button.twitter{color:#fff!important;background:#56c2ea!important}.button.linkedin,button.linkedin{color:#fff!important;background:#0076b5!important}.button.github,button.github{color:#fff!important;background:#7e7c7c!important}.button:focus,button:focus{outline:0}button.close{width:30px;height:30px;line-height:30px;padding:0;margin:0;background:var(--config-color-normal);color:var(--config-color-background-fade);border-radius:50%}button.close .icon-cancel::before{line-height:1}button.close.is-margin-top-10{margin-top:10px}label{margin-bottom:15px;display:block;line-height:normal}label.inline{display:inline}.input,input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px}.input[type=file],input[type=date][type=file],input[type=datetime-local][type=file],input[type=email][type=file],input[type=file][type=file],input[type=number][type=file],input[type=password][type=file],input[type=search][type=file],input[type=tel][type=file],input[type=text][type=file],input[type=url][type=file],select[type=file],textarea[type=file]{line-height:0;padding:15px;height:auto}.input:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=file]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:#b3d7fd}.input:disabled,input[type=date]:disabled,input[type=datetime-local]:disabled,input[type=email]:disabled,input[type=file]:disabled,input[type=number]:disabled,input[type=password]:disabled,input[type=search]:disabled,input[type=tel]:disabled,input[type=text]:disabled,input[type=url]:disabled,select:disabled,textarea:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.input.strip,input[type=date].strip,input[type=datetime-local].strip,input[type=email].strip,input[type=file].strip,input[type=number].strip,input[type=password].strip,input[type=search].strip,input[type=tel].strip,input[type=text].strip,input[type=url].strip,select.strip,textarea.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.input.strip:focus,input[type=date].strip:focus,input[type=datetime-local].strip:focus,input[type=email].strip:focus,input[type=file].strip:focus,input[type=number].strip:focus,input[type=password].strip:focus,input[type=search].strip:focus,input[type=tel].strip:focus,input[type=text].strip:focus,input[type=url].strip:focus,select.strip:focus,textarea.strip:focus{border-color:#b3d7fd}.input:-webkit-autofill::first-line,input[type=date]:-webkit-autofill::first-line,input[type=datetime-local]:-webkit-autofill::first-line,input[type=email]:-webkit-autofill::first-line,input[type=file]:-webkit-autofill::first-line,input[type=number]:-webkit-autofill::first-line,input[type=password]:-webkit-autofill::first-line,input[type=search]:-webkit-autofill::first-line,input[type=tel]:-webkit-autofill::first-line,input[type=text]:-webkit-autofill::first-line,input[type=url]:-webkit-autofill::first-line,select:-webkit-autofill::first-line,textarea:-webkit-autofill::first-line{font-weight:300;font-size:16px}input[type=email],input[type=url]{direction:ltr}input[type=email]::placeholder,input[type=url]::placeholder{text-align:left;direction:ltr}select{background:0 0;-webkit-appearance:none;background-image:var(--config-console-nav-switch-arrow);background-position:left 15px top 50%;background-repeat:no-repeat;background-color:var(--config-color-background-input);width:calc(100% - 62px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:45px}select:-webkit-autofill{background-image:url("data:image/svg+xml;utf8,")!important;background-position:100% 50%!important;background-repeat:no-repeat!important}input[type=search],input[type=search].strip{background:0 0;-webkit-appearance:none;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAdZJREFUWIXt1s2LjWEYBvDfnDMzFpNIamZIFrMiJYMyFmKhZKfOwoiFr2LFn2BByG6WVrKwMcjWxgoLIlKIUk6RrzAjZWZ8LO731FlwvB+PUbjq6X0X7/VeV/d9P9fz8IdRL8Hpw3x8w0xaOz9GNxq4gJeZcGs1cRab0fU7xLfgMSYzoT3YgNXYhIO4iM+4iTWphGs4jikcFSXvhEGczr4/UFW8C2N4jXUFudvwCYeqGNgnSr6yJH8rpkWLCqMfE9hdUryFE3iC3qLEk7ij+kT34Q32FiHV8Qr7K4q3cArXihCGxd5elMjARnzBvE4f1dreV+AtnicycC/7/7K8BhaIvqXCO3zFwrwGZtCT0EAtW9N5DTSxWGR/CizNns/yEgbFEK5NZGCnaEPHE7e9Ai9wA6OJDIzistgJubFdxHB/RfFVYgCHixJruI5x5dNwDm6J47sUhkTvjpUw0Y1zeOrXR3hHjOA9zmBuTs4Arog4/yhuUZWwHPdFMh7280BZgiP4ILJ/UuymqRQmejPxphiquzgvKnMJDzOxB9glZqiRiecykbfHdawX98EhcdxO4BGu4nYm2EJDzEKPSMIdYrBnFYUq8d/EP2di1gey3cS4ErflvxffASbhcakIINaMAAAAAElFTkSuQmCC);background-color:var(--config-color-background-input);background-position:right 15px top 50%;background-repeat:no-repeat;background-size:20px 20px;width:calc(100% - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:45px}select[multiple]{min-height:75px;padding:5px 10px!important;padding-left:50px!important}select[multiple] option{padding:10px 4px;border-bottom:solid 1px #f1f1f1}select[multiple] option:last-child{border-bottom:none}textarea{min-height:75px;resize:vertical;line-height:32px;padding:5px 15px}textarea.tall{min-height:180px}fieldset{border:none;margin:0;padding:0}.counter{font-size:13px;text-align:left;color:var(--config-color-fade);margin-top:-20px;margin-bottom:20px}.file-preview{background:var(--config-color-background-input) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAIElEQVQoU2NkYGAwZsAEZ9GFGIeIQix+wfQgyDODXSEAcUwGCrDSHgkAAAAASUVORK5CYII=)!important;box-shadow:inset 0 0 3px #a0a0a0;border-radius:8px;width:calc(100% - 2px);max-height:180px;visibility:visible!important;object-fit:contain}.video-preview{padding-top:56%;position:relative;border-radius:10px;background:#e7e7e7;overflow:hidden;margin:0}.video-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.map-preview{padding-top:50%;position:relative;margin-bottom:10px;border-radius:10px;background:#e7e7e7;overflow:hidden;box-shadow:0 0 30px rgba(218,218,218,.5)}.map-preview iframe{position:absolute;top:0;width:100%;height:100%;border:none}.tooltip{position:relative}.tooltip.large:hover:after{white-space:normal;width:280px}.tooltip.small:hover:after{white-space:normal;width:180px}.tooltip:hover:after{white-space:nowrap;background:var(--config-color-tooltip-background);border-radius:5px;bottom:calc(100% + 6px);color:var(--config-color-tooltip-text);content:attr(data-tooltip);padding:5px 15px;position:absolute;font-size:13px;line-height:20px;z-index:98;right:20%;margin-right:-30px;word-break:break-word}.tooltip:hover:before{border:solid;border-color:var(--config-color-tooltip-background) transparent;border-width:6px 6px 0 6px;bottom:100%;content:"";position:absolute;z-index:99;right:3px}.tooltip.down:hover:after{top:calc(100% + 6px);bottom:inherit}.tooltip.down:hover:before{top:100%;border-width:0 6px 6px 6px;bottom:inherit}.tag{display:inline-block;background:var(--config-color-fade-light);color:var(--config-color-fade);border-radius:12px;line-height:24px;padding:0 8px;font-size:12px;box-shadow:none!important;border:none;height:auto;width:auto;white-space:nowrap;text-overflow:ellipsis}.tag:hover{border:none}.tag.green{background:var(--config-color-success);color:#fff}.tag.red{background:var(--config-color-danger);color:#fff}.tag.yellow{background:#ffe28b;color:#494949}.tag.focus{background:var(--config-color-focus);color:#fff}.tag.dark{background:var(--config-color-dark);color:#e7e7e7}.tag.blue{background:var(--config-color-info);color:#fff}.tag.link{background:var(--config-color-link);color:#fff}input[type=checkbox],input[type=radio]{width:26px;height:16px;position:relative;-webkit-appearance:none;border-radius:0;border:none;background:0 0;vertical-align:middle;margin:0}input[type=checkbox]:after,input[type=radio]:after{content:"";display:block;width:20px;height:20px;background:var(--config-color-background-fade);top:-5px;border-radius:50%;position:absolute;border:solid 3px var(--config-color-focus);vertical-align:middle}input[type=checkbox]:checked:after,input[type=radio]:checked:after{text-align:center;font-family:icon;content:'\ea14';font-size:16px;line-height:20px;color:var(--config-color-background-fade);background:var(--config-color-focus)}input[type=checkbox][type=radio]:checked:after,input[type=radio][type=radio]:checked:after{content:'';display:block;width:10px;height:10px;border-radius:50%;background:var(--config-color-background-fade);border:solid 8px var(--config-color-focus)}input[type=checkbox]:focus,input[type=radio]:focus{outline:0}input[type=checkbox]:focus:after,input[type=checkbox]:hover:after,input[type=radio]:focus:after,input[type=radio]:hover:after{outline:0;border-color:#000}input[type=checkbox]:checked:focus:after,input[type=checkbox]:checked:hover:after,input[type=radio]:checked:focus:after,input[type=radio]:checked:hover:after{border-color:var(--config-color-focus)}input[type=checkbox]:after{border-radius:4px}.input-copy{position:relative}.input-copy::before{content:'';display:block;position:absolute;height:50px;background:var(--config-color-fade-light);width:50px;right:0;border-radius:8px;z-index:1;margin:1px}.input-copy input,.input-copy textarea{padding-left:65px;width:calc(100% - 82px);resize:none}.input-copy .copy{position:absolute;z-index:2;top:0;left:0;border-right:solid 1px var(--config-color-fade-light);height:calc(100% - 2px);width:50px;line-height:50px;text-align:center;background:var(--config-color-background-focus);margin:1px;border-radius:0 9px 9px 0}.paging{color:var(--config-color-fade);padding:0;font-size:12px}.paging form{display:inline-block}.paging button:disabled{color:var(--config-color-background-fade);opacity:.6}.blue-snap iframe{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;float:none!important;height:40px!important;width:calc(100% - 32px)!important;border:solid 1px #e2e2e2!important;background:0 0!important;position:static!important}.blue-snap iframe[type=file]{line-height:0;padding:15px;height:auto}.blue-snap iframe:focus{outline:0;border-color:#b3d7fd}.blue-snap iframe:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.blue-snap iframe.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.blue-snap iframe.strip:focus{border-color:#b3d7fd}.blue-snap iframe:-webkit-autofill::first-line{font-weight:300;font-size:16px}.blue-snap .error{font-size:12px;margin-top:-25px;color:var(--config-color-danger);height:40px;padding-right:2px}.pell{height:auto;padding-bottom:0;margin-bottom:0;padding-top:0;background:var(--config-color-background-input);line-height:normal!important;position:relative}.pell.hide{padding:0!important;height:1px;min-height:1px;max-height:1px;border:none;box-shadow:none;margin-bottom:20px;opacity:0}.pell [contenteditable=true]:empty:before{content:attr(placeholder);display:block;color:var(--config-color-placeholder)}.pell .pell-actionbar{border-bottom:solid 1px var(--config-color-fade-light);margin:0 -15px 15px -15px;padding:10px 15px;position:sticky;top:70px;background:var(--config-color-background-input);border-radius:10px 10px 0 0}.pell .pell-content{min-height:100px;display:block;padding:10px;margin:-10px;cursor:text}.pell .pell-content:focus{outline:0}.pell button{background:inherit;color:inherit;margin:0;padding:0;padding-left:15px;height:40px;line-height:40px;box-shadow:none;cursor:pointer;font-size:13px;border-radius:0}.pell button.pell-button-selected,.pell button:focus,.pell button:hover{color:var(--config-color-link)}.pell h1,.pell h2,.pell h3,.pell h4,.pell h5,.pell h6{text-align:inherit;margin-bottom:30px}.pell b,.pell strong{font-weight:700}.pell ol,.pell ul{margin:0 0 20px 0}.pell ol li,.pell ul li{display:list-item!important;list-style:inherit;list-style-position:inside!important;margin:0 20px 2px 20px}.pell ol li p,.pell ul li p{margin:0;display:inline}.pell ol li{list-style:decimal}.pell ol li::before{content:'';display:none}label.switch{line-height:42px}.switch,input[type=checkbox].button.switch,input[type=checkbox].switch{width:52px;height:32px;line-height:32px;border-radius:21px;background:var(--config-color-fade);display:inline-block;margin:0;padding:5px;padding-right:5px;padding-left:30px}.switch.on,.switch:checked,input[type=checkbox].button.switch.on,input[type=checkbox].button.switch:checked,input[type=checkbox].switch.on,input[type=checkbox].switch:checked{background-color:var(--config-color-success);padding-right:25px;padding-left:5px}.switch.on:focus,.switch.on:hover,.switch:checked:focus,.switch:checked:hover,input[type=checkbox].button.switch.on:focus,input[type=checkbox].button.switch.on:hover,input[type=checkbox].button.switch:checked:focus,input[type=checkbox].button.switch:checked:hover,input[type=checkbox].switch.on:focus,input[type=checkbox].switch.on:hover,input[type=checkbox].switch:checked:focus,input[type=checkbox].switch:checked:hover{background:var(--config-color-success)}.switch:focus,.switch:hover,input[type=checkbox].button.switch:focus,input[type=checkbox].button.switch:hover,input[type=checkbox].switch:focus,input[type=checkbox].switch:hover{background:var(--config-color-fade)}.switch:focus:after,.switch:hover:after,input[type=checkbox].button.switch:focus:after,input[type=checkbox].button.switch:hover:after,input[type=checkbox].switch:focus:after,input[type=checkbox].switch:hover:after{background:#fff}.switch:after,input[type=checkbox].button.switch:after,input[type=checkbox].switch:after{content:"";display:block;width:22px;height:22px;background:#fff;border-radius:50%;border:none;position:static;top:0}.password-meter{margin:-41px 10px 30px 10px;height:2px;background:0 0;max-width:100%;z-index:2;position:relative}.password-meter.weak{background:var(--config-color-danger)}.password-meter.medium{background:var(--config-color-success)}.password-meter.strong{background:var(--config-color-success)}.color-input:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.color-input .color-preview{width:53px;height:53px;float:right;margin-left:10px;background:#000;border-radius:10px;box-shadow:inset 0 0 3px #a0a0a0;position:relative}.color-input .color-preview input{opacity:0;position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%;cursor:pointer}.color-input input{text-transform:uppercase;float:right;width:calc(100% - 95px)}.grecaptcha-badge{box-shadow:none!important;border-radius:10px!important;overflow:hidden!important;background:#4d92df!important;bottom:25px}.grecaptcha-badge:hover{width:256px!important}.back{font-size:15px;line-height:24px;height:24px;margin-right:-15px;margin-top:-25px;margin-bottom:20px}.back span{font-weight:inherit!important}@media only screen and (max-width:550px){.back{margin-right:-5px}}hr{height:1px;background:var(--config-border-color)!important;border:none}hr.fade{opacity:.7}.upload{position:relative}.upload:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload input{position:absolute;top:0;right:0;opacity:0;cursor:pointer}.upload.single .preview{height:0;position:relative;padding-top:100%;width:100%;margin-bottom:15px!important}.upload.single .preview li{position:absolute;top:0;width:calc(100% - 20px);height:calc(100% - 20px);margin-left:0!important;margin-bottom:0!important}.upload .button{float:right;margin-left:10px!important}.upload .button.disabled,.upload .button.disabled:hover{background:0 0;color:inherit;border-color:inherit}.upload .count{float:right;line-height:52px}.upload .progress{background:var(--config-color-success);height:6px;border-radius:3px;margin-bottom:15px!important}.upload .preview:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.upload .preview li{float:right;margin-left:20px!important;margin-bottom:15px!important;background:var(--config-color-background-fade-super);width:150px;height:150px;line-height:148px;text-align:center;border-radius:20px;overflow:hidden;position:relative;cursor:pointer;border:solid 1px var(--config-color-background-dark)}.upload .preview li:hover:before{background:var(--config-color-focus)}.upload .preview li:before{content:'\ea11';font-family:icon;font-size:12px;position:absolute;width:20px;height:20px;display:block;top:8px;left:8px;text-align:center;line-height:20px;vertical-align:middle;border-radius:50%;background:#484848;color:#fff;z-index:1}.upload .preview li img{vertical-align:middle;max-height:150px;max-width:150px;-webkit-filter:drop-shadow(0 0 6px rgba(0, 0, 0, .3));filter:drop-shadow(0 0 1px rgba(0, 0, 0, .3))}.upload.wide .preview li{height:0;width:100%;position:relative;padding-top:30.547%;background:#e7e7e7;border-radius:10px;overflow:hidden;border:solid 1px #f9f9f9;margin:0}.upload.wide .preview li img{border-radius:10px;position:absolute;top:0;width:100%;display:block;opacity:1;max-width:inherit;max-height:inherit}ol{list-style:none;counter-reset:x-counter;padding:0}ol li{counter-increment:x-counter;line-height:30px;margin-bottom:30px;margin-right:45px}ol li::before{display:inline-block;content:counter(x-counter);color:var(--config-color-background-fade);background:var(--config-color-focus);border:solid 2px var(--config-color-focus);margin-left:15px;margin-right:-45px;width:26px;height:26px;border-radius:50%;text-align:center;line-height:26px}.required{color:var(--config-color-danger);font-size:8px;position:relative;top:-8px}.drop-list{position:relative;outline:0}.drop-list.open ul{display:block}.drop-list ul{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px;border-radius:4px;box-shadow:0 0 6px rgba(0,0,0,.1);display:none;position:absolute;bottom:calc(100% + 10px);z-index:2;padding:0;right:-10px;max-width:280px;min-width:240px}.drop-list ul.padding-tiny{padding:5px}.drop-list ul.padding-xs{padding:10px}.drop-list ul.padding-small{padding:15px}.drop-list ul.y-scroll{overflow-y:auto}.drop-list ul.danger{background:var(--config-color-danger);color:#fff}.drop-list ul.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.drop-list ul.danger>.button,.drop-list ul.danger>button{background:#fff;color:var(--config-color-danger)}.drop-list ul.note{background:var(--config-note-background)}.drop-list ul.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.drop-list ul.focus .button,.drop-list ul.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.drop-list ul.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.drop-list ul.warning{background:var(--config-color-warning);color:#2d2d2d}.drop-list ul.warning .button,.drop-list ul.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.drop-list ul .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.drop-list ul>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.drop-list ul hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.drop-list ul .label{position:absolute;top:10px;z-index:2;left:10px}.drop-list ul.fade-bottom{position:relative;overflow:hidden}.drop-list ul.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.drop-list ul .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.drop-list ul ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.drop-list ul ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.drop-list ul ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.drop-list ul ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.drop-list ul .scroll{margin:0 -30px;overflow-y:scroll}.drop-list ul .scroll table{width:100%;margin:0}.drop-list ul ul.sortable{counter-reset:section}.drop-list ul ul.sortable>li [data-move-down].round,.drop-list ul ul.sortable>li [data-move-up].round,.drop-list ul ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.drop-list ul ul.sortable>li [data-move-down].round:disabled,.drop-list ul ul.sortable>li [data-move-up].round:disabled,.drop-list ul ul.sortable>li [data-remove].round:disabled{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]{display:none}.drop-list ul ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul ul.sortable>li:last-child [data-move-down]{display:none}.drop-list ul ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.drop-list ul .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.drop-list ul .toggle.list{border-bottom:none}.drop-list ul .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.drop-list ul .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.drop-list ul .toggle .icon-minus,.drop-list ul .toggle .icon-up-open{display:none}.drop-list ul .toggle .content{display:none}.drop-list ul .toggle.open{height:auto}.drop-list ul .toggle.open .icon-minus,.drop-list ul .toggle.open .icon-up-open{display:block}.drop-list ul .toggle.open .icon-down-open,.drop-list ul .toggle.open .icon-plus{display:none}.drop-list ul .toggle.open .content{display:block}.drop-list ul .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.drop-list ul .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.drop-list ul .list li .actions{float:none}}.drop-list ul .list li .avatar{display:block}.drop-list ul .list li .avatar.inline{display:inline-block}.drop-list ul.new{text-align:center}.drop-list ul.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.drop-list ul.new b{margin-top:20px;display:block}.drop-list ul .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.drop-list ul .info hr{background:var(--config-modal-note-border)!important}.drop-list ul .table-wrap{margin:0 -30px;overflow-y:scroll}.drop-list ul .table-wrap table{margin:0}.drop-list ul:before{border:solid;border-color:var(--config-color-background-fade) transparent;border-width:8px 8px 0 8px;bottom:-8px;content:"";position:absolute;z-index:99;right:30px}.drop-list ul.arrow-end:before{left:30px;right:unset}.drop-list ul.no-arrow::before{display:none}.drop-list ul li{border-bottom:solid 1px var(--config-color-fade-super);margin:0;padding:0}.drop-list ul li:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.drop-list ul li:first-child{border-radius:4px 4px 0 0}.drop-list ul li:last-child{border-radius:0 0 4px 4px}.drop-list ul li:hover{background:var(--config-color-fade-super)}.drop-list ul li:first-child:hover,.drop-list ul li:last-child:hover{border-color:transparent}.drop-list ul li .link,.drop-list ul li a,.drop-list ul li button.link{display:block;vertical-align:middle;height:auto;line-height:30px;display:inline-block;padding:10px 15px!important;color:inherit;font-size:14px;border:none;cursor:pointer;width:calc(100% - 30px);text-align:right;box-sizing:content-box}.drop-list ul li.disabled .link:hover,.drop-list ul li.disabled a:hover{background:0 0}.drop-list ul li .avatar{width:30px;height:30px;margin-left:10px;float:right}.drop-list ul li i.avatar{text-align:center;background:var(--config-color-dark);color:var(--config-color-background-fade)}.drop-list ul li:last-child{border-bottom:none}.drop-list.bottom ul{bottom:auto;margin-top:-2px}.drop-list.bottom ul:before{bottom:auto;top:-8px;border-width:0 8px 8px 8px}.drop-list.end ul{left:-10px;right:auto}.disabled{opacity:.2;cursor:default}.disabled .button,.disabled .link,.disabled a,.disabled button{cursor:default!important}.disabled .button:hover,.disabled .link:hover,.disabled a:hover,.disabled button:hover{background:0 0}.tags{-webkit-appearance:none;-moz-appearance:none;-webkit-transform:translateZ(0);box-sizing:content-box;color:#313131;height:40px;line-height:40px;border:solid 1px var(--config-color-fade-light);border-radius:10px;padding:5px 15px;font-size:16px;display:block;width:calc(100% - 32px);margin-bottom:30px;background:var(--config-color-background-input);min-height:42px;height:auto;cursor:text}.tags[type=file]{line-height:0;padding:15px;height:auto}.tags:focus{outline:0;border-color:#b3d7fd}.tags:disabled{color:var(--config-color-normal);background:var(--config-color-fade-super);opacity:1!important}.tags.strip{border:none;border-radius:0;padding:5px 0;width:100%;background-color:transparent;background-position:left 2px top 50%;border-bottom:solid 1px var(--config-color-fade-light);color:var(--config-color-placeholder)}.tags.strip:focus{border-color:#b3d7fd}.tags:-webkit-autofill::first-line{font-weight:300;font-size:16px}.tags .add{display:inline-block!important;border:none;padding:0;width:auto;margin:0;max-width:100%;min-width:200px}.tags ul.tags-list{display:inline;white-space:pre-line}.tags ul.tags-list li{display:inline-block!important;margin-left:10px;font-size:16px;padding:5px 10px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tags ul.tags-list li::before{float:left;content:'\ea11';font-family:icon;font-style:normal;display:inline-block;text-align:center;line-height:16px;width:16px;height:16px;font-size:12px;background:#000;color:#fff;border-radius:50%;margin-top:4px;margin-bottom:4px;margin-right:6px;margin-left:0}.switch-theme{background:var(--config-switch-background);border-radius:19px;height:26px;width:44px;margin:9px 0}.switch-theme button{padding:3px;display:block;background:0 0;height:26px;width:100%}.switch-theme i{background:var(--config-color-background-fade);border-radius:50%;height:18px;width:18px;line-height:18px;font-size:10px;padding:0;margin:0;color:var(--config-color-fade)}.switch-theme i.force-light{float:left}.switch-theme i.force-dark{float:right}.dot{width:20px;height:20px;background:var(--config-color-fade);border-radius:50%;display:inline-block;vertical-align:middle;margin:0!important;padding:0!important}.dot.danger{background:var(--config-color-danger)!important}.dot.success{background:var(--config-color-success)!important}.dot.warning{background:var(--config-color-warning)!important}.dot.info{background:var(--config-color-info)!important}.ide{background-color:var(--config-prism-background);overflow:hidden;position:relative;z-index:1;box-shadow:0 2px 4px 0 rgba(50,50,93,.3);border-radius:10px;margin-bottom:30px}.ide *{font-family:"Source Code Pro",monospace}.ide[data-lang]::after{content:attr(data-lang-label);display:inline-block;background:#fff;color:#000;position:absolute;top:15px;padding:5px 10px;border-radius:15px;font-size:10px;right:10px;opacity:.95}.ide[data-lang=bash]::after{background:var(--config-language-bash);color:var(--config-language-bash-contrast)}.ide[data-lang=javascript]::after{background:var(--config-language-javascript);color:var(--config-language-javascript-contrast)}.ide[data-lang=web]::after{background:var(--config-language-web);color:var(--config-language-web-contrast)}.ide[data-lang=html]::after{background:var(--config-language-html);color:var(--config-language-html-contrast)}.ide[data-lang=php]::after{background:var(--config-language-php);color:var(--config-language-php-contrast)}.ide[data-lang=nodejs]::after{background:var(--config-language-nodejs);color:var(--config-language-nodejs-contrast)}.ide[data-lang=ruby]::after{background:var(--config-language-ruby);color:var(--config-language-ruby-contrast)}.ide[data-lang=python]::after{background:var(--config-language-python);color:var(--config-language-python-contrast)}.ide[data-lang=go]::after{background:var(--config-language-go);color:var(--config-language-go-contrast)}.ide[data-lang=dart]::after{background:var(--config-language-dart);color:var(--config-language-dart-contrast)}.ide[data-lang=flutter]::after{background:var(--config-language-flutter);color:var(--config-language-flutter-contrast)}.ide[data-lang=android]::after{background:var(--config-language-android);color:var(--config-language-android-contrast)}.ide[data-lang=swift]::after{background:var(--config-language-swift);color:var(--config-language-swift-contrast)}.ide[data-lang=kotlin]::after{background:var(--config-language-kotlin);color:var(--config-language-kotlin-contrast)}.ide[data-lang=java]::after{background:var(--config-language-java);color:var(--config-language-java-contrast)}.ide[data-lang=yaml]::after{background:var(--config-language-yaml);color:var(--config-language-yaml-contrast)}.ide .tag{color:inherit!important;background:0 0!important;padding:inherit!important;font-size:inherit!important;line-height:14px}.ide .copy{cursor:pointer;content:attr(data-lang);display:inline-block;background:#fff;color:#000;position:absolute;transform:translateX(-50%);bottom:-20px;padding:5px 10px;border-radius:15px;font-size:10px;font-style:normal;right:50%;opacity:0;transition:bottom .3s,opacity .3s;line-height:normal;font-family:Poppins,sans-serif}.ide .copy::before{padding-left:5px}.ide:hover .copy{transition:bottom .3s,opacity .3s;opacity:.9;bottom:16px}.ide pre{-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;color:#e6ebf1;font-weight:400;line-height:20px;font-size:13px;margin:0;padding:20px;padding-left:60px}.ide.light{box-shadow:0 2px 4px 0 rgba(50,50,93,.1);background-color:#fff}.ide.light pre{color:#414770}.ide.light .token.cdata,.ide.light .token.comment,.ide.light .token.doctype,.ide.light .token.prolog{color:#91a2b0}.ide.light .token.attr-name,.ide.light .token.builtin,.ide.light .token.char,.ide.light .token.inserted,.ide.light .token.selector,.ide.light .token.string{color:#149570}.ide.light .token.punctuation{color:#414770}.ide.light .language-css .token.string,.ide.light .style .token.string,.ide.light .token.entity,.ide.light .token.operator,.ide.light .token.url,.ide.light .token.variable{color:#414770}.ide.light .line-numbers .line-numbers-rows{background:#f2feef}.ide.light .line-numbers-rows>span:before{color:#5dc79e}.ide.light .token.keyword{color:#6772e4;font-weight:500}code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#6b7c93}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#f79a59}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#3ecf8e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#45b2e8}.token.keyword{color:#7795f8}.token.important,.token.regex{color:#fd971f}.token.italic{font-style:italic}.token.entity{cursor:help}pre[class*=language-].line-numbers{position:relative;padding-left:60px;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{background:var(--config-prism-numbers);position:absolute;pointer-events:none;top:-20px;bottom:-21px;padding:20px 0;font-size:100%;left:-60px;width:40px;letter-spacing:-1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{padding-left:5px;pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#636365;display:block;padding-right:.8em;text-align:right}.u-margin-inline-end-16{margin-inline-end:16px!important}.console{width:100%;padding:0;overscroll-behavior:none}.console body{position:relative;width:calc(100% - 320px);padding-top:70px;padding-bottom:0;padding-left:50px;padding-right:270px;margin:0;color:var(--config-color-normal);background:var(--config-console-background)}.console body .project-only{display:none!important}.console body.show-nav .project-only{display:inline-block!important}.console body.hide-nav{padding-right:50px;width:calc(100% - 100px)}.console body.hide-nav header{width:calc(100% - 50px)}.console body.hide-nav header .logo{display:inline-block}.console body.hide-nav .console-back{display:block}.console body.hide-nav .console-index{display:none}.console body.hide-nav .account{display:none}.console body.index .console-back{display:none}.console body.index .console-index{display:block}.console body.index .account{display:block}.console body .console-index{display:block}.console body .console-back{display:none}.console main{min-height:480px}.console header{position:fixed;top:0;width:calc(100% - 280px);height:40px;line-height:40px;padding:15px 30px;background:var(--config-color-background-fade);box-shadow:0 0 2px rgba(0,0,0,.1);margin:0 -50px;z-index:2;font-size:14px}.console header .logo{display:none;border:none}.console header .logo:hover{border:none;opacity:.8}.console header .logo img{height:26px;margin:7px 0}.console header .setup-new{width:40px;height:40px;line-height:40px}.console header .list{width:240px}.console header .list select{height:40px;line-height:40px;padding-top:0;padding-bottom:0;border:none;border-radius:26px;background-color:var(--config-console-nav-switch-background);color:var(--config-console-nav-switch-color)}.console header .account{margin-right:25px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.console header .switch-theme{margin:2px 0}.console header .avatar{height:40px;width:40px}.console header .account-button{background:0 0;position:absolute;width:100%;height:40px;border-radius:0;z-index:1}.console header .notifications{position:relative;font-size:20px}.console header .notifications a{color:#1b3445}.console header .notifications:after{position:absolute;content:"";display:block;background:var(--config-color-danger);width:8px;height:8px;border-radius:50%;top:3px;left:3px}.console header nav{background:#1b3445;background:linear-gradient(var(--config-console-nav-start),var(--config-console-nav-end));color:#788c99;position:fixed;height:100%;width:220px;top:0;right:0}.console header nav .logo{height:39px;padding:15px 20px;display:block}.console header nav .logo img{display:inline-block;margin-top:7px;margin-bottom:14px}.console header nav .logo svg g{fill:var(--config-color-focus)}.console header nav .icon{display:block;border:none;margin:18px 10px 50px 10px}.console header nav .icon img{display:block}.console header nav .icon:hover{border-bottom:none}.console header nav .icon:hover svg g{fill:var(--config-color-focus)}.console header nav .container{overflow:auto;height:calc(100% - 133px);width:100%}.console header nav .project-box{padding:20px;text-align:center;display:block;border:none;line-height:100px;height:100px}.console header nav .project-box img{max-height:80px;max-width:80%;display:inline-block;vertical-align:middle}.console header nav .project{display:block;padding:85px 25px 20px 25px;color:#788c99;position:relative;border:none;height:20px}.console header nav .project:hover{border-bottom:none}.console header nav .project .name{height:20px;line-height:20px;margin:0;padding:0;display:inline-block;max-width:100%}.console header nav .project .arrow{display:block;position:absolute;left:5px;top:10px;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #788c99;transform:rotate(225deg)}.console header nav .project img{position:absolute;bottom:40px;display:block;margin-bottom:10px;max-height:35px;max-width:40%}.console header nav .subtitle{padding:0 30px;display:block;font-size:12px;font-weight:300}.console header nav .links{margin-bottom:15px!important}.console header nav .links.top{border:none;padding-bottom:0;margin-bottom:5px!important}.console header nav .links.bottom{position:absolute;bottom:0;left:0;right:0;padding-bottom:0;border:none;margin-bottom:0!important;box-shadow:0 0 10px rgba(0,0,0,.1)}.console header nav .links.bottom a{border-top:solid 1px var(--config-console-nav-border);border-bottom:none}.console header nav .links .sub{display:inline-block;border:none;width:25px;height:25px;line-height:25px;border-radius:50%;padding:0;background:var(--config-color-focus);color:#fff;text-align:center;font-size:12px;margin:18px}.console header nav .links .sub i{width:auto;margin:0}.console header nav .links .sub:hover{border:none}.console header nav .links a{padding:8px 20px;border:none;display:flex;color:#87a5b9;font-weight:400;border-right:solid 5px transparent;font-size:13px}.console header nav .links a i{margin-left:8px;width:22px;display:inline-block}.console header nav .links a.selected,.console header nav .links a:hover{color:#e4e4e4}.console header nav:after{content:'';display:block;position:absolute;background:#302839;height:100px;width:100%;bottom:-100px}.console>footer{width:calc(100% + 100px);margin:0 -50px;box-sizing:border-box;background:0 0;padding-left:30px;padding-right:30px}.console>footer ul{float:none;text-align:center}.console>footer ul li{float:none;display:inline-block}.console .projects{position:relative}.console .projects:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.console .projects li{float:right;margin-left:50px;margin-bottom:50px;width:270px}.console .projects li:nth-child(3n){margin-left:0}.console .dashboard{padding:20px;overflow:visible;position:relative;z-index:1;margin-bottom:2px}.console .dashboard .chart{width:80%}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .chart{width:100%}}.console .dashboard hr{margin:20px -25px;height:2px;background:var(--config-console-background)}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard hr{height:3px}}.console .dashboard footer{margin:-20px;padding:20px;background:#fcfeff;border:none;color:var(--config-color-link)}.console .dashboard .col{position:relative}.console .dashboard .col:last-child:after{display:none}.console .dashboard .col:after{content:"";display:block;width:2px;background:var(--config-console-background);position:absolute;top:-20px;bottom:-20px;left:24px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console .dashboard .col:after{width:calc(100% + 40px);height:3px;position:static;margin:20px -20px}}.console .dashboard .value{color:var(--config-color-focus);vertical-align:bottom;line-height:45px}.console .dashboard .value.small{line-height:35px}.console .dashboard .value .sum{font-size:45px;line-height:45px;font-weight:700;vertical-align:bottom}.console .dashboard .value .sum.small{font-size:25px;line-height:25px}.console .dashboard .unit{font-weight:500;line-height:20px;vertical-align:bottom;font-size:16px;display:inline-block;margin-bottom:5px;margin-right:5px;color:var(--config-color-focus)}.console .dashboard .metric{color:var(--config-color-focus);font-weight:400;font-size:13px;line-height:16px}.console .dashboard .range{color:var(--config-color-fade);font-weight:400;font-size:14px;line-height:16px}.console .dashboard a{display:block;font-weight:400;font-size:14px;line-height:16px;padding:0;border:none}.console .dashboard .chart-bar{height:4rem;width:auto;display:flex;align-items:flex-end}@media only screen and (min-width:1199px){.console .dashboard .chart-bar{padding-right:15px}}.console .dashboard .chart-bar .bar{width:12.5%;background-color:var(--config-color-chart-fade);margin:0 2px;border-top:2px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar:hover{background-color:var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-100{height:100%}.console .dashboard .chart-bar .bar.bar-90{height:90%}.console .dashboard .chart-bar .bar.bar-80{height:80%}.console .dashboard .chart-bar .bar.bar-70{height:70%}.console .dashboard .chart-bar .bar.bar-60{height:60%}.console .dashboard .chart-bar .bar.bar-50{height:50%}.console .dashboard .chart-bar .bar.bar-40{height:40%}.console .dashboard .chart-bar .bar.bar-30{height:30%}.console .dashboard .chart-bar .bar.bar-20{height:20%}.console .dashboard .chart-bar .bar.bar-10{height:10%}.console .dashboard .chart-bar .bar.bar-0{height:0%}.console .dashboard .chart-bar .bar.bar-0{border-top:1px solid var(--config-color-chart)}.console .dashboard .chart-bar .bar.bar-5{height:5%}.console .chart-metric{width:19%}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart-metric{width:100%}}.console .chart{width:100%;position:relative;height:0;padding-top:20px;padding-bottom:26%;margin-left:-2px;overflow:hidden;background-color:var(--config-color-background-fade);background-image:linear-gradient(transparent 1px,transparent 1px),linear-gradient(90deg,transparent 1px,transparent 1px),linear-gradient(var(--config-border-color) 1px,transparent 1px),linear-gradient(90deg,var(--config-border-color) 1px,transparent 1px);background-size:100px 100px,100px 100px,20px 20px,20px 20px;background-position:-2px -2px,-2px -2px,-1px -1px,-1px -1px;background-repeat:round;border:solid 1px var(--config-border-color);border-right:solid 1px transparent;border-bottom:solid 1px transparent}.console .chart.background-image-no{background-image:none}.console .chart.border-no{border:none}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (max-width:550px){.console .chart{width:100%;padding-bottom:32%;float:none;margin-bottom:20px}}.console .chart canvas{position:absolute;bottom:0;display:block;height:100%;width:100%}.console .chart-notes{font-size:12px}.console .chart-notes.crud li.create,.console .chart-notes.crud li:nth-child(1){color:#00b680}.console .chart-notes.crud li.create::before,.console .chart-notes.crud li:nth-child(1)::before{background:#00b680}.console .chart-notes.crud li.read,.console .chart-notes.crud li:nth-child(2){color:#009cde}.console .chart-notes.crud li.read::before,.console .chart-notes.crud li:nth-child(2)::before{background:#009cde}.console .chart-notes.crud li.update,.console .chart-notes.crud li:nth-child(3){color:#696fd7}.console .chart-notes.crud li.update::before,.console .chart-notes.crud li:nth-child(3)::before{background:#696fd7}.console .chart-notes.crud li.delete,.console .chart-notes.crud li:nth-child(4){color:#da5d95}.console .chart-notes.crud li.delete::before,.console .chart-notes.crud li:nth-child(4)::before{background:#da5d95}.console .chart-notes li{line-height:20px;display:inline-block;margin-left:15px}.console .chart-notes li::before{display:inline-block;content:'';width:14px;height:14px;background:var(--config-color-normal);border-radius:50%;margin-left:8px;vertical-align:middle}.console .chart-notes li.blue,.console .chart-notes li:nth-child(1){color:var(--config-color-chart)}.console .chart-notes li.blue::before,.console .chart-notes li:nth-child(1)::before{background:var(--config-color-chart)}.console .chart-notes li.green,.console .chart-notes li:nth-child(2){color:#4eb55b}.console .chart-notes li.green::before,.console .chart-notes li:nth-child(2)::before{background:#4eb55b}.console .chart-notes li.orange,.console .chart-notes li:nth-child(3){color:#ec9323}.console .chart-notes li.orange::before,.console .chart-notes li:nth-child(3)::before{background:#ec9323}.console .chart-notes li.red,.console .chart-notes li:nth-child(4){color:#dc3232}.console .chart-notes li.red::before,.console .chart-notes li:nth-child(4)::before{background:#dc3232}.console .community a{padding:0 10px;display:inline-block}.console .link-list li{margin-bottom:15px}.console .link-list i{display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;background:var(--config-color-fade);color:var(--config-color-fade-super);border-radius:50%;margin-left:15px}.console .link-list i.fade{background:0 0;color:var(--config-color-fade)}.console .provider{width:50px;height:50px;background:var(--config-color-background-focus);color:#868686;line-height:50px;text-align:center;font-size:25px;border-radius:50%}.console .provider.facebook{color:#fff;background:#3b5998}.console .provider.twitter{color:#fff;background:#55beff}.console .provider.telegram{color:#fff;background:#3ba9e1}.console .provider.github{color:#fff;background:#24292e}.console .provider.whatsapp{color:#fff;background:#25d366}.console .provider.linkedin{color:#fff;background:#1074af}.console .provider.microsoft{color:#fff;background:#137ad4}.console .provider.google{color:#fff;background:#4489f1}.console .provider.bitbucket{color:#fff;background:#2a88fb}.console .provider.gitlab{color:#faa238;background:#30353e}.console .provider.instagram{color:#fff;background:radial-gradient(circle at 30% 107%,#fdf497 0,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285aeb 90%)}.console .premium{z-index:3;margin-top:320px}.console .premium .message{height:190px;overflow:hidden;position:absolute;top:-280px}.console .premium:after{content:'';position:absolute;top:0;left:-20px;right:-20px;bottom:-20px;background:var(--config-color-background);opacity:.7;z-index:300}.console .app-section{height:90px}.console .confirm{background:var(--config-color-link);color:#fff;border-radius:25px;padding:12px;line-height:28px;text-align:center}.console .confirm .action{font-weight:500;cursor:pointer}.console .platforms{overflow:hidden}.console .platforms .box{overflow:hidden}.console .platforms .box img{width:50px;margin:0 auto;margin-bottom:20px}.console .platforms .box .cover{margin:-30px -30px 30px -30px;padding:30px}.console .platforms .box .cover.android{background:#a4ca24}.console .platforms .box .cover.android h1{color:#fff;font-size:18px;margin-top:20px}.console .platforms .col{text-align:center;line-height:30px}.console .platforms a{display:block;margin:-20px;padding:20px}.console .platforms a:hover{background:#fbfeff}.console .platforms img{display:block;margin:0 30px;width:calc(100% - 60px);border-radius:50%;margin-bottom:20px}.console .document-nav{display:none;position:sticky;top:90px}@media only screen and (min-width:1380px){.console .document-nav{display:block}}.console .document-nav ul{position:absolute;width:200px;right:-260px}.console .document-nav ul li{margin-bottom:20px}.console .document-nav ul li .selected{font-weight:500}@media only screen and (min-width:1199px){.console .logo .top{display:none!important}}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.console>header{width:calc(100% - 30px)!important;margin:0 -30px;padding:15px}.console>header nav{width:100%;height:70px;overflow:hidden}.console>header nav.close{background:0 0}.console>header nav.close .logo .nav{display:none!important}.console>header nav.open{height:100%}.console>header nav.open .logo .top{display:none!important}.console>header nav.open .bottom{display:block!important}.console>header nav.open button{color:#87a5b9}.console>header nav button{margin:9px;background:0 0;color:var(--config-color-normal)}.console>header nav button:focus,.console>header nav button:hover{background:0 0}.console>header nav .logo{display:block!important;position:absolute;top:0;left:50%;margin:auto;transform:translateX(-50%)}.console>header nav .bottom{display:none!important}.console>footer{width:auto;margin:50px -30px 0 -30px!important;padding:0 30px 30px 30px}.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 60px)!important;padding:70px 30px 0 30px!important}.console .cover{padding:25px 30px;margin:0 -30px}}@media only screen and (max-width:550px){.console body{height:"calc(100% - 70px)"!important;width:calc(100% - 40px)!important;padding:70px 20px 0 20px!important}.console .cover{padding:20px 20px;margin:0 -20px}.console>header{margin:0 -20px}.console>header .list{width:175px;font-size:14px}.console>footer{margin:50px -20px 0 -20px!important;padding:0 20px 20px 20px}}.dev-feature{display:none}.prod-feature{display:none}.development .dev-feature{display:block;opacity:.6!important;outline:solid #ff0 3px;outline-offset:3px}.development .dev-feature.dev-inline{display:inline-block}.development .prod-feature{display:none}.production .dev-feature{display:none}.production .prod-feature{display:block}.search{opacity:1!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.search button{margin-top:20px}}html.home body{padding:0 50px;color:var(--config-color-normal)}html.home .logo a{display:block}html.home .logo a:hover{opacity:.8}html.home .logo img{max-height:35px;width:198px;margin:45px auto 25px auto}html.home footer{background:0 0;text-align:center}html.home main{min-height:400px}.alerts ul{width:100%;visibility:hidden;position:fixed;padding:0;left:0;right:0;color:var(--config-color-normal);z-index:1001;margin:0 auto;bottom:15px;max-width:560px}.alerts ul li{margin:10px 0 0 0;padding:0}.alerts ul li div.message{position:relative;padding:12px 35px;margin:0 auto;list-style:none;background:var(--config-color-background-dark);text-align:center;font-size:14px;border-radius:10px;line-height:16px;min-height:16px;box-shadow:0 0 10px rgba(0,0,0,.05);opacity:.95}.alerts ul li div.message a,.alerts ul li div.message span{font-weight:600}.alerts ul li div.message a{border-bottom:dotted 1px var(--config-color-normal)}.alerts ul li div.message i{cursor:pointer;position:absolute;font-size:14px;line-height:20px;top:9px;right:9px;color:var(--config-color-background-dark);background:var(--config-color-normal);width:22px;height:22px;border-radius:50%}.alerts ul li div.message.error{color:#fff!important;background:var(--config-color-danger)!important}.alerts ul li div.message.error a{color:#fff!important;border-bottom:dotted 1px #fff!important}.alerts ul li div.message.error i{color:var(--config-color-danger);background:#fff}.alerts ul li div.message.success{color:#fff!important;background:var(--config-color-success)!important}.alerts ul li div.message.success a{color:#fff;border-bottom:dotted 1px #fff}.alerts ul li div.message.success i{color:var(--config-color-success);background:#fff}.alerts ul li div.message.warning{color:var(--config-color-normal)!important;background:var(--config-color-warning)!important}.alerts ul li div.message.warning a{color:var(--config-color-normal)!important;border-bottom:dotted 1px var(--config-color-normal)!important}.alerts ul li div.message.warning i{color:#fff;background:var(--config-color-normal)!important}.alerts ul li div.message.open{display:block}.alerts ul li div.message.close{display:none}.alerts .cookie-alert{background:var(--config-color-focus-fade)!important;color:var(--config-color-focus)}.alerts .cookie-alert a{color:var(--config-color-focus);font-weight:400;border-bottom:dotted 1px var(--config-color-focus)!important}.alerts .cookie-alert i{color:var(--config-color-focus-fade)!important;background:var(--config-color-focus)!important}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.alerts ul{top:auto;bottom:0;max-width:100%;right:0}.alerts ul li{margin:5px 0 0 0}.alerts ul li div.message{border-radius:0}}.show-nav .alerts ul{right:220px}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.show-nav .alerts ul{right:0}}article{overflow-wrap:break-word;word-wrap:break-word}article h1{font-size:36px}article h2{font-size:24px}article h3{font-size:20px}article h4{font-size:20px}article h5{font-size:18px}article h6{font-size:16px}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:30px!important;margin-bottom:30px!important}article p{line-height:32px;font-size:16px}article .update{display:block;margin-top:50px!important}article table{width:100%;margin:0;margin-bottom:30px!important;border-radius:0;border-bottom:solid 1px var(--config-border-color)}article table thead td{font-weight:500;padding:5px 15px}article table td,article table th{padding:15px;height:auto}article table td:first-child,article table th:first-child{padding-right:10px}article table td:last-child,article table th:last-child{padding-left:10px}article table td p,article table th p{font-size:inherit;line-height:inherit}article table td p:last-child,article table th p:last-child{margin:0}.avatar-container{position:relative}.avatar-container .corner{position:absolute;bottom:-3px;left:-3px}.avatar{width:60px;height:60px;border-radius:50%;background:var(--config-color-background-focus);display:inline-block;overflow:hidden;box-shadow:0 0 6px rgba(0,0,0,.09);position:relative;z-index:1;opacity:1!important}.avatar.hide{display:none}.avatar:before{width:100%;height:100%;z-index:0}.avatar.inline{display:inline-block;vertical-align:middle}.avatar.trans{background:0 0}.avatar .no-shadow{box-shadow:none}.avatar.xs{width:30px;height:30px}.avatar.xxs{width:20px;height:20px}.avatar.small{width:50px;height:50px}.avatar.big{width:100px;height:100px}.avatar.huge{width:150px;height:150px}.box{position:relative;background:var(--config-color-background-fade);border-radius:10px;border-bottom:none;box-shadow:0 0 3px rgba(0,0,0,.05);display:block;padding:30px}.box.padding-tiny{padding:5px}.box.padding-xs{padding:10px}.box.padding-small{padding:15px}.box.y-scroll{overflow-y:auto}.box.danger{background:var(--config-color-danger);color:#fff}.box.danger .box{color:var(--config-color-normal);background:var(--config-color-background-fade)}.box.danger>.button,.box.danger>button{background:#fff;color:var(--config-color-danger)}.box.note{background:var(--config-note-background)}.box.focus{background:var(--config-color-focus);color:var(--config-color-background-fade)}.box.focus .button,.box.focus button{background:var(--config-color-background-fade);color:var(--config-color-focus)}.box.line{background:0 0;border:solid 1px var(--config-color-background-dark);box-shadow:none}.box.warning{background:var(--config-color-warning);color:#2d2d2d}.box.warning .button,.box.warning button{background:rgba(45,45,45,.8);color:var(--config-color-success)}.box .tabs{border-bottom:solid 1px var(--config-border-color);margin:0 -30px;padding:0 30px!important}.box>footer{margin:0 -30px -30px -30px;padding:15px 30px;background:var(--config-color-background-fade);border:solid 1px var(--config-border-color);border-radius:0 0 10px 10px}.box hr{height:1px;background:var(--config-console-background);border:none;margin:30px -30px}.box .label{position:absolute;top:10px;z-index:2;left:10px}.box.fade-bottom{position:relative;overflow:hidden}.box.fade-bottom:after{content:"";position:absolute;display:block;bottom:15px;width:100%;background:#000;background:linear-gradient(180deg,rgba(0,0,0,0) 0,var(--config-color-background-fade) 80%);height:100px;margin:0 -15px}.box .header{position:static;height:40px;padding:20px 30px 20px 30px;margin-bottom:30px;margin:-30px -30px 20px -30px;background:var(--config-color-background-fade);border-bottom:solid 1px #efefef}.box ul.numbers>li{position:relative;margin-right:30px;margin-left:50px}.box ul.numbers>li hr{margin-right:-60px;margin-left:-80px}.box ul.numbers>li .settings{position:absolute;top:3px;left:-50px}.box ul.numbers>li::after{display:block;width:25px;height:25px;line-height:25px;font-size:13px;font-weight:500;border-radius:50%;background:var(--config-color-focus);color:var(--config-color-background);counter-increment:section;content:counter(section);text-align:center;position:absolute;top:3px;right:-45px}.box .scroll{margin:0 -30px;overflow-y:scroll}.box .scroll table{width:100%;margin:0}.box ul.sortable{counter-reset:section}.box ul.sortable>li [data-move-down].round,.box ul.sortable>li [data-move-up].round,.box ul.sortable>li [data-remove].round{background:var(--config-color-focus);color:var(--config-color-background-fade);width:25px;height:25px;line-height:25px;display:inline-block;text-align:center;padding:0;margin-left:5px}.box ul.sortable>li [data-move-down].round:disabled,.box ul.sortable>li [data-move-up].round:disabled,.box ul.sortable>li [data-remove].round:disabled{display:none}.box ul.sortable>li:first-child [data-move-up]{display:none}.box ul.sortable>li:first-child [data-move-up]:disabled{display:inline-block;background:var(--config-color-background)}.box ul.sortable>li:last-child [data-move-down]{display:none}.box ul.sortable>li:last-child [data-move-down]:disabled{display:inline-block;background:var(--config-color-background)}.box .toggle{position:relative;border-top:1px solid var(--config-console-background);border-bottom:1px solid var(--config-console-background);margin:0 -30px;padding:30px 30px 0 30px;height:65px;overflow:hidden}.box .toggle.list{border-bottom:none}.box .toggle.sorts button.ls-ui-open{width:calc(100% - 100px)}.box .toggle button.ls-ui-open{left:0;position:absolute;top:0;width:100%;height:95px;background:0 0;opacity:.5;border-radius:0}.box .toggle .icon-minus,.box .toggle .icon-up-open{display:none}.box .toggle .content{display:none}.box .toggle.open{height:auto}.box .toggle.open .icon-minus,.box .toggle.open .icon-up-open{display:block}.box .toggle.open .icon-down-open,.box .toggle.open .icon-plus{display:none}.box .toggle.open .content{display:block}.box .list li{border-bottom:solid 2px var(--config-border-color);margin:0 -30px 30px -30px;padding:0 30px 30px 30px}.box .list li:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none}@media only screen and (max-width:550px){.box .list li .actions{float:none}}.box .list li .avatar{display:block}.box .list li .avatar.inline{display:inline-block}.box.new{text-align:center}.box.new i{font-size:80px;line-height:80px;font-family:Poppins,sans-serif;font-style:normal;font-weight:300}.box.new b{margin-top:20px;display:block}.box .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.box .info hr{background:var(--config-modal-note-border)!important}.box .table-wrap{margin:0 -30px;overflow-y:scroll}.box .table-wrap table{margin:0}a.box{border-right:none;border-left:none}a.box:hover{box-shadow:0 0 1px rgba(0,0,0,.2);opacity:.7}.box-asidex{padding-left:25px!important;padding-right:70px;left:0;background:#f9f9f9;border-radius:0 10px 10px 0;height:calc(100% - 30px);position:absolute;padding-top:30px}.box-asidex:after{content:"";display:block;position:absolute;height:100%;width:51px;background:#fff;top:0;bottom:0;right:-6px}.cover{background:var(--config-color-focus-fade);padding:30px 50px;margin:0 -50px;position:relative;border-bottom:solid 1px var(--config-border-fade)}.cover .title,.cover h1,.cover h2,.cover h3,.cover h4{color:var(--config-color-focus);font-weight:600;margin-bottom:50px!important;font-size:28px;line-height:42px}.cover .title span,.cover h1 span,.cover h2 span,.cover h3 span,.cover h4 span{font-weight:600}.cover i:before{margin:0!important}.cover p{color:var(--config-color-fade)}.cover .button{color:#fff}.cover .link,.cover a{display:inline-flex;color:var(--config-color-focus);border-left:none;border-right:none;cursor:pointer}.cover .link:hover,.cover a:hover{border-bottom-color:var(--config-color-focus)}.cover .link i,.cover a i{margin-right:.2rem}.console .database .row .col{height:452px}.console .database .row .col:after{width:2px;left:20px}.console .database hr{margin:0 -20px;background:var(--config-color-background);height:1px}.console .database h3{font-size:13px;line-height:20px;height:20px;background-color:var(--config-color-fade-super);margin:-20px -20px 0 -20px;padding:10px 20px;border-bottom:solid 1px var(--config-color-background);font-weight:600}.console .database .empty{height:162px;font-size:12px;text-align:center;margin:50px 0}.console .database .empty h4{font-size:13px;font-weight:600;line-height:120px}.console .database .search{background-color:var(--config-color-fade-super);margin:0 -20px 0 -20px;padding:10px 15px}.console .database .search input{height:40px;background-color:#fff;border-radius:25px;padding-top:0;padding-bottom:0}.console .database .code{height:411px;background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px;width:calc(100% - 10px)}.console .database .code .ide{overflow:scroll;height:451px;margin:-20px;box-shadow:none;border-radius:0}.console .database .paging{background:var(--config-color-fade-super);margin:0 -20px -20px -20px;padding:20px}.console .database .button{margin:0 -20px;padding:0 20px!important;text-align:inherit;color:var(--config-color-focus);width:100%;font-size:15px;line-height:55px;box-sizing:content-box}.console .database .button i{margin-left:8px}.console .database .button:hover{border:none;background:var(--config-color-focus-fade)}.console .database .items{margin:0 -20px;height:262px;overflow-x:hidden;overflow-y:scroll}.console .database .items form{opacity:0;position:relative}.console .database .items form button{position:absolute;top:0;bottom:0;right:0;left:0;width:100%;height:45px;border-radius:0;cursor:pointer}.console .database .items li{padding:0;margin:0 0;line-height:45px;font-size:15px;padding-right:50px;padding-left:30px;position:relative}.console .database .items li i{position:absolute;display:none;left:10px}.console .database .items li .name{display:inline-block;width:100%;height:28px}.console .database .items li.selected,.console .database .items li:hover{background:#f5f5f5}.console .database .items li.selected i,.console .database .items li:hover i{display:block}.console .database .items li:last-child{border-bottom:none}body>footer{color:var(--config-color-fade);line-height:40px;margin:0 -50px;padding:12px 50px;font-size:13px;width:100%;background:#f1f1f1;position:relative;margin-top:80px!important}body>footer:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer .logo img{height:22px;padding-top:12px}body>footer a{display:inline-flex;color:var(--config-color-fade);font-size:13px}body>footer a:hover{border-bottom-color:var(--config-color-fade)}body>footer a i{margin-right:.2rem}body>footer ul{display:flex;justify-content:center}body>footer ul:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}body>footer ul li{font-size:13px;float:right;margin-left:20px!important}body>footer .copyright{padding-right:2px}.loader{height:0;direction:ltr;position:fixed;top:0;width:0;margin:0 auto;right:0;opacity:0;z-index:4}.load-start~.loader{width:100%;background:var(--config-color-focus);height:3px;opacity:1;transition:width .3s ease-out,opacity .5s ease-out;-moz-transition:width .3s ease-out,opacity .5s ease-out;-webkit-transition:width .3s ease-out,opacity .5s ease-out;-o-transition:width .3s ease-out,opacity .5s ease-out}.www .load-start~.loader{background:#fff}.load-start>*{opacity:0}.load-end>*{opacity:1;transition:opacity .3s ease-out;-moz-transition:opacity .3s ease-out;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out}[data-ls-if]{display:none}[data-service]{opacity:0}.load-service-start{opacity:0}.load-service-end{opacity:1;transition:opacity .5s ease-out;-moz-transition:opacity .5s ease-out;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out}.load-screen{z-index:100000;position:fixed;height:100%;width:100%;background-color:var(--config-color-background-focus);top:0;right:0}.load-screen.loaded{transition:opacity 1s ease-in-out,top 1s .7s;opacity:0;top:-100%}.load-screen .animation{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%) translateZ(1px);width:140px;height:140px}.load-screen .animation div{box-sizing:border-box;display:block;position:absolute;width:124px;height:124px;margin:10px;border:10px solid var(--config-color-focus);border-radius:50%;animation:animation 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--config-color-focus) transparent transparent transparent}.load-screen .animation div:nth-child(1){animation-delay:-.45s}.load-screen .animation div:nth-child(2){animation-delay:-.3s}.load-screen .animation div:nth-child(3){animation-delay:-.15s}@keyframes animation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.load-screen img{position:absolute;height:20px;bottom:60px;left:50%;transform:translate(-50%,-50%)}.modal-open .modal-bg,.modal-open body .modal-bg{position:fixed;content:'';display:block;width:100%;height:100%;left:0;right:0;top:0;bottom:0;background:#0c0c0c;opacity:.75;z-index:5}.modal{overflow:auto;display:none;position:fixed;transform:translate3d(0,0,0);width:100%;max-height:90%;max-width:640px;background:var(--config-color-background-fade);z-index:1000;box-shadow:0 0 4px rgba(0,0,0,.25);padding:30px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;box-sizing:border-box;text-align:right;white-space:initial;line-height:normal}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.modal{width:calc(100% - 20px)}}.modal.full{max-width:none;max-height:none;height:100%;border-radius:0;padding:80px 120px}.modal.full h1{font-weight:700}.modal.padding-tiny{padding:5px}.modal.padding-xs{padding:10px}.modal.padding-small{padding:15px}.modal.height-tiny>form{height:100px}.modal.height-small>form{height:220px}.modal.width-small{max-width:400px}.modal.width-medium{max-width:500px}.modal.width-large{max-width:800px}.modal.open{display:block}.modalbutton.close{display:none}.modal.fill{height:95%;max-height:95%;max-width:75%}.modal h1,.modal h2{margin-bottom:25px;margin-top:0;font-size:20px;text-align:right}.modal h1,.modal h2,.modal h3,.modal h4,.modal h5,.modal h6{color:inherit!important;line-height:35px}.modal .main,.modal>form{position:relative;border-top:solid 1px var(--config-border-color);padding:30px 30px 0 30px;margin:0 -30px}.modal .main.strip,.modal>form.strip{border:none;padding:0;margin:0}.modal .separator{margin:20px -30px}.modal .bullets{padding-right:40px}.modal .bullets li{margin-bottom:30px!important}.modal .bullets li:before{position:absolute}.modal .info{margin:0 -30px;padding:20px 30px;background:var(--config-modal-note-background);color:var(--config-modal-note-color);border-top:solid 1px var(--config-modal-note-border);border-bottom:solid 1px var(--config-modal-note-border)}.modal .ide.strech{box-shadow:none;border-radius:0;margin:0 -30px}.modal .ide pre{overflow:auto}.modal .paging form{padding:0;margin:0;border-top:none}.modal.sticky-footer form footer{margin:-30px}.modal.sticky-footer footer{position:sticky;bottom:-30px;background:var(--config-color-background-fade-super);height:50px;z-index:1;padding:30px;box-shadow:0 0 1px rgba(0,0,0,.15)}.modal.sticky-footer footer form{display:inline-block}[data-views-current="0"] .scroll-to,[data-views-current="1"] .scroll-to{opacity:0!important}.scroll-to-bottom .scroll-to,.scroll-to-top .scroll-to{opacity:1}.scroll-to{opacity:0;display:block;width:40px;height:40px;line-height:40px;border-radius:50%;position:fixed;transform:translateZ(0);margin:30px;padding:0;bottom:0;font-size:18px;z-index:100000;transition:opacity .15s ease-in-out;left:0}.phases{list-style:none;margin:0;padding:0;position:relative}.phases li{display:none}.phases li .badge{display:none}.phases li li{display:block}.phases li.selected{display:block}.phases .number{display:none}.phases h2,.phases h3,.phases h4,.phases h5,.phases h6{margin:0 0 30px 0;text-align:inherit}.container{position:relative}.container .tabs{height:55px;line-height:55px;list-style:none;padding:0;margin-bottom:50px!important;margin-top:-55px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container .tabs:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.container .tabs li{position:relative}.container .tabs .badge{background:var(--config-color-focus);color:var(--config-color-background-fade);display:inline-block;border-radius:15px;width:15px;height:15px;margin:10px;line-height:15px;padding:3px;text-align:center;font-weight:500!important;position:absolute;top:-5px;right:-35px;font-size:12px}.container .tabs .selected{font-weight:400;color:var(--config-color-focus);opacity:1}.container .tabs .selected:after{content:"";display:block;height:2px;background:var(--config-color-focus);width:calc(100% + 6px);margin:0 -3px;position:absolute;bottom:0;border-radius:2px}.container .tabs .number{display:none}.container .tabs li{float:right;margin-left:50px;color:var(--config-color-focus);opacity:.9;cursor:pointer}.container .tabs li:focus{outline:0}@media only screen and (max-width:550px){.container .tabs li{margin-left:25px}}.container .icon{display:none}@media only screen and (max-width:550px),only screen and (min-width:551px) and (max-width:1198px){.container .tabs{width:auto;overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.container .tabs li{display:inline-block;float:none}}.preview-box{display:grid;place-content:center;padding:40px;background:var(--config-color-background-fade);border:1px dashed var(--config-color-background-dark);border-radius:8px}.preview-box-image{display:grid;place-content:center;width:40px;height:40px;margin-inline:auto;background-color:var(--config-color-background-focus);border-radius:50%}.preview-box-text{margin-top:16px;color:var(--config-color-fade)}.upload-box{--p-header-text-color:var(--config-color-background-fade);--p-header-bg-color:var(--config-color-normal);--p-content-text-color:var(--config-color-normal);--p-content-bg-color:var(--config-color-background-fade);--p-border-color:var(--config-modal-note-border);--box-shadow:0 10px 10px rgba(0, 0, 0, 0.05);--border-radius:6px;--transition:0.2s;position:fixed;z-index:1;overflow:hidden;min-width:285px;box-shadow:var(--box-shadow);border-radius:var(--border-radius);font-size:14px;line-height:1}.upload-box *{all:unset;display:revert}.upload-box-header{display:flex;padding:16px;padding-inline-end:21px;color:var(--p-header-text-color);background-color:var(--p-header-bg-color)}.upload-box-header .icon-button{margin-inline-start:16px}.upload-box-title{align-self:center;margin-inline-end:auto;margin-block-end:0}.upload-box-title .amount::before{content:"("}.upload-box-title .amount::after{content:")"}.upload-box-content{background-color:var(--p-content-bg-color);color:var(--p-content-text-color);height:0;overflow:auto;transition:var(--transition)}.upload-box-content.is-open{height:200px}.upload-box-item{display:flex;align-items:center;padding:13px 20px}.upload-box-item .file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;margin-inline-end:auto;line-height:normal}.upload-box-item .icon-button{align-self:center;margin-inline-start:16px}.upload-box-item .pill{margin-inline-start:8px}.upload-box-item:not(:last-child){border-bottom:solid 1px var(--p-border-color)}@media only screen and (max-width:550px){.upload-box{inset-inline:16px;inset-block-end:20px}}@media only screen and (min-width:551px) and (max-width:1198px),only screen and (min-width:1199px){.upload-box{max-width:285px;inset-inline-end:24px;inset-block-end:24px}}:root .theme-dark .upload-box{--p-header-text-color:#fff;--p-header-bg-color:var(--config-color-background-dark)}.upload-image{--p-upload-image-size:var(--upload-image-size, 40px);--p-upload-bg-color:var(--config-color-fade-super);--p-upload-icon-color:var(--config-color-fade);position:relative;display:grid;place-content:center;flex-shrink:0;width:var(--p-upload-image-size);height:var(--p-upload-image-size);background-color:var(--p-upload-bg-color);color:var(--p-upload-icon-color);border-radius:50%}.upload-image .icon{position:relative;z-index:20}.upload-image .progress{--progress:var(--progress-value, 0);--zero-value:0 0% 0%/0%;position:absolute;z-index:10;inset:0;border-radius:50%;background:radial-gradient(var(--p-upload-bg-color) 0,var(--p-upload-bg-color) 64%,transparent 64.01%,transparent 100%),conic-gradient(hsl(194 66% 50%) 0,hsl(97 66% 50%) calc(var(--progress) * 1%),hsl(var(--zero-value)) calc(var(--progress) * 1%),hsl(var(--zero-value)) 100%)}.upload-image.is-finished .progress{display:none}:root .theme-dark .upload-image{--p-upload-bg-color:var(--config-color-background-dark);--p-upload-icon-color:var(--config-color-focus)}.icon-button{--p-icon-button-size:var(--icon-button-size, 20px);width:var(--p-icon-button-size);height:var(--p-icon-button-size);font-size:var(--p-icon-button-size);transition:.2s;line-height:1;text-align:center;flex-shrink:0;cursor:pointer}.icon-button>::before{margin:0}.icon-button.is-open{transform:rotate(180deg)}.icon-button.is-success{color:var(--config-color-success)}.icon-button:focus,.icon-button:hover{background-color:unset}.icon-button:focus-visible{outline:dashed 1px var(--config-color-primary)}.pill{--p-pill-text-color:var(--config-defalut-color-hsl, var(--pill-text-color));color:hsl(var(--p-pill-text-color));background-color:hsl(var(--p-pill-text-color) / .2);display:inline-grid;place-content:center;padding-inline:12px;height:30px;border-radius:15px;font-size:14px;font-weight:500}.pill.is-disabled{--p-pill-text-color:var(--config-disabled-color-hsl)}.pill.is-pending{--p-pill-text-color:var(--config-pending-color-hsl)}.pill.is-failed{--p-pill-text-color:var(--config-failed-color-hsl)}:root .theme-dark .pill.is-failed{color:#ffcfcf;background-color:#b91c1c}html{padding:0;margin:0;direction:rtl}body{margin:0;background:var(--config-console-background) no-repeat fixed;min-width:300px}ul{padding:0;margin:0}ul li{margin:0;list-style:none}.icon-left-open:before{content:'\e814'!important}.icon-right-open:before{content:'\e813'!important}.icon-right-dir:before{content:'\e84e'!important}.icon-left-dir:before{content:'\e84d'!important}.icon-link-ext:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.icon-article-alt:before{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}.copy{border-radius:10px 0 0 10px!important} \ No newline at end of file diff --git a/public/styles/icons.less b/public/styles/icons.less index e947d1fb79..1f01bc6144 100644 --- a/public/styles/icons.less +++ b/public/styles/icons.less @@ -114,6 +114,7 @@ .icon-lightning:before { content: "\ea45"; } .icon-link-ext:before { content: "\ea46"; } .icon-link:before { content: "\ea47"; } +.icon-url:before { content: "\ea47"; } .icon-linkedin:before { content: "\ea48"; } .icon-list-bullet:before { content: "\ea49"; } .icon-list-numbered:before { content: "\ea4a"; } @@ -122,6 +123,7 @@ .icon-lock:before { content: "\ea4d"; } .icon-login:before { content: "\ea4e"; } .icon-mail:before { content: "\ea4f"; } +.icon-email:before { content: "\ea4f"; } .icon-medium:before { content: "\ea50"; } .icon-menu:before { content: "\ea51"; } .icon-minus:before { content: "\ea52"; } From 30ccc3928784367734b919ea2d30385d0331c6ff Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 13 Apr 2022 09:50:37 +0545 Subject: [PATCH 60/73] sdk-generator update --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 730621ca17..4f01b06e48 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,7 @@ } ], "require-dev": { - "appwrite/sdk-generator": "0.18.2", + "appwrite/sdk-generator": "0.18.3", "phpunit/phpunit": "9.5.10", "swoole/ide-helper": "4.8.5", "textalk/websocket": "1.5.5", diff --git a/composer.lock b/composer.lock index 866dec5cec..7f35cbd379 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bca03b1d0b7dd312bc174e0a2973b015", + "content-hash": "e0de8d0bba618a46646cf3da1e06a652", "packages": [ { "name": "adhocore/jwt", @@ -3075,16 +3075,16 @@ }, { "name": "appwrite/sdk-generator", - "version": "0.18.2", + "version": "0.18.3", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "9381507c1526da1c099eb2297e68374dec4e3793" + "reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/9381507c1526da1c099eb2297e68374dec4e3793", - "reference": "9381507c1526da1c099eb2297e68374dec4e3793", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/96e2c9b0f350d4fa43ddff6334ef44908716c944", + "reference": "96e2c9b0f350d4fa43ddff6334ef44908716c944", "shasum": "" }, "require": { @@ -3119,9 +3119,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.18.2" + "source": "https://github.com/appwrite/sdk-generator/tree/0.18.3" }, - "time": "2022-04-10T09:03:18+00:00" + "time": "2022-04-13T04:00:59+00:00" }, { "name": "composer/pcre", From 4247214c698d8d6bf2e183b4412726570c529a9a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 13 Apr 2022 09:56:11 +0545 Subject: [PATCH 61/73] update versions --- app/config/platforms.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 85c2111135..5d363ab55c 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -81,7 +81,7 @@ return [ [ 'key' => 'apple', 'name' => 'Apple', - 'version' => '0.3.1', + 'version' => '0.4.0', 'url' => 'https://github.com/appwrite/sdk-for-apple', 'package' => 'https://github.com/appwrite/sdk-for-apple', 'enabled' => true, @@ -116,7 +116,7 @@ return [ [ 'key' => 'android', 'name' => 'Android', - 'version' => '0.4.1', + 'version' => '0.5.0', 'url' => 'https://github.com/appwrite/sdk-for-android', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, @@ -180,7 +180,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '0.15.0', + 'version' => '0.16.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -208,7 +208,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '5.0.0', + 'version' => '5.1.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -226,7 +226,7 @@ return [ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '3.0.0', + 'version' => '3.1.0', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -244,7 +244,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '4.0.0', + 'version' => '4.1.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -262,7 +262,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '0.7.0', + 'version' => '0.8.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -280,7 +280,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '4.0.0', + 'version' => '4.1.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -370,7 +370,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '0.3.0', + 'version' => '0.4.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -392,7 +392,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '0.3.1', + 'version' => '0.4.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, From d903f562a7f215c1f9fcb618eb72e4ccd51f0267 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 13 Apr 2022 11:58:09 +0300 Subject: [PATCH 62/73] feat: fix docker-compose error --- app/config/specs/open-api3-latest-client.json | 2 +- .../specs/open-api3-latest-console.json | 2 +- app/config/specs/open-api3-latest-server.json | 2 +- app/config/specs/swagger2-latest-client.json | 4849 +----- app/config/specs/swagger2-latest-console.json | 12999 +--------------- app/config/specs/swagger2-latest-server.json | 9049 +---------- composer.lock | 2 +- docker-compose.yml | 4 +- 8 files changed, 9 insertions(+), 26900 deletions(-) diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 4a50ae051a..9bb535fcbf 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.13.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 2bf73f9e7b..82aee91ffe 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.13.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":97,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":76,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getUsage","weight":74,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":75,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List the currently active function runtimes.","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":196,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":121,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":120,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":124,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":129,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":146,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":145,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":147,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":149,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":148,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":136,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":135,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list.","x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":137,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":138,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list","x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":139,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":141,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":140,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":"[HOSTNAME]"}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":142,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":143,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":"[HOSTNAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":144,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account"},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":123,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":131,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":130,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":132,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":133,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":134,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":164,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":191,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerVkAppid":{"type":"string","description":"VK OAuth app ID.","x-example":"123247283472834787438"},"providerVkSecret":{"type":"string","description":"VK OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerVkAppid","providerVkSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","type","key","store","hostname","httpUser","httpPass"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":97,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":76,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getUsage","weight":74,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":75,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":196,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":121,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":120,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":124,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":129,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":146,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":145,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":147,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":149,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":148,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":136,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":135,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list.","x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":137,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":138,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list","x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":139,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":141,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":140,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":"[HOSTNAME]"}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":142,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":143,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":"[HOSTNAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":144,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account"},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":123,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":131,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":130,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":132,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":133,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":134,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":164,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":191,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerVkAppid":{"type":"string","description":"VK OAuth app ID.","x-example":"123247283472834787438"},"providerVkSecret":{"type":"string","description":"VK OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerVkAppid","providerVkSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","type","key","store","hostname","httpUser","httpPass"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index f8cd29951e..1f6d0f99e1 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.13.0","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List the currently active function runtimes.","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":1},"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"schema":{"type":"string","x-example":"center","default":"center"},"in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"schema":{"type":"number","format":"float","x-example":0,"default":1},"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"schema":{"type":"integer","format":"int32","x-example":-360,"default":0},"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"type":"string","x-example":"[SEARCH]","default":""},"in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":25},"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index f298daa50a..cdf7726ac0 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1,4848 +1 @@ -{ - "swagger": "2.0", - "info": { - "version": "0.13.0", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "termsOfService": "https://appwrite.io/policy/terms", - "contact": { - "name": "Appwrite Team", - "url": "https://appwrite.io/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" - } - }, - "host": "HOSTNAME", - "basePath": "/v1", - "schemes": ["https"], - "consumes": ["application/json", "multipart/form-data"], - "produces": ["application/json"], - "securityDefinitions": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { "demo": "5df5acd0d48c2" } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { "demo": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..." } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { "demo": "en" } - } - }, - "paths": { - "/account": { - "get": { - "summary": "Get Account", - "operationId": "accountGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user data as JSON object.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "post": { - "summary": "Create Account", - "operationId": "accountCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](/docs/client/account#accountCreateSession).", - "responses": { - "201": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[USER_ID]" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - }, - "delete": { - "summary": "Delete Account", - "operationId": "accountDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 56, - "cookies": false, - "type": "", - "demo": "account/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/account/email": { - "patch": { - "summary": "Update Account Email", - "operationId": "accountUpdateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateEmail", - "weight": 54, - "cookies": false, - "type": "", - "demo": "account/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - ] - } - }, - "/account/jwt": { - "post": { - "summary": "Create Account JWT", - "operationId": "accountCreateJWT", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "schema": { "$ref": "#/definitions/jwt" } - } - }, - "x-appwrite": { - "method": "createJWT", - "weight": 46, - "cookies": false, - "type": "", - "demo": "account/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-jwt.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }] - } - }, - "/account/logs": { - "get": { - "summary": "Get Account Logs", - "operationId": "accountGetLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "schema": { "$ref": "#/definitions/logList" } - } - }, - "x-appwrite": { - "method": "getLogs", - "weight": 50, - "cookies": false, - "type": "", - "demo": "account/get-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "limit", - "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/account/name": { - "patch": { - "summary": "Update Account Name", - "operationId": "accountUpdateName", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 52, - "cookies": false, - "type": "", - "demo": "account/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - } - }, - "/account/password": { - "patch": { - "summary": "Update Account Password", - "operationId": "accountUpdatePassword", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 53, - "cookies": false, - "type": "", - "demo": "account/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password" - } - }, - "required": ["password"] - } - } - ] - } - }, - "/account/prefs": { - "get": { - "summary": "Get Account Preferences", - "operationId": "accountGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user preferences as a key-value object.", - "responses": { - "200": { - "description": "Preferences", - "schema": { "$ref": "#/definitions/preferences" } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "patch": { - "summary": "Update Account Preferences", - "operationId": "accountUpdatePrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 55, - "cookies": false, - "type": "", - "demo": "account/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - ] - } - }, - "/account/recovery": { - "post": { - "summary": "Create Password Recovery", - "operationId": "accountCreateRecovery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createRecovery", - "weight": 60, - "cookies": false, - "type": "", - "demo": "account/create-recovery.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},email:{param-email}", "ip:{ip}"], - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - } - }, - "required": ["email", "url"] - } - } - ] - }, - "put": { - "summary": "Create Password Recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "updateRecovery", - "weight": 61, - "cookies": false, - "type": "", - "demo": "account/update-recovery.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "default": null, - "x-example": "[SECRET]" - }, - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "passwordAgain": { - "type": "string", - "description": "Repeat new user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["userId", "secret", "password", "passwordAgain"] - } - } - ] - } - }, - "/account/sessions": { - "get": { - "summary": "Get Account Sessions", - "operationId": "accountGetSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user list of active sessions across different devices.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { "$ref": "#/definitions/sessionList" } - } - }, - "x-appwrite": { - "method": "getSessions", - "weight": 49, - "cookies": false, - "type": "", - "demo": "account/get-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "post": { - "summary": "Create Account Session", - "operationId": "accountCreateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.", - "responses": { - "201": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account/create-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - ] - }, - "delete": { - "summary": "Delete All Account Sessions", - "operationId": "accountDeleteSessions", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSessions", - "weight": 59, - "cookies": false, - "type": "", - "demo": "account/delete-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/account/sessions/anonymous": { - "post": { - "summary": "Create Anonymous Session", - "operationId": "accountCreateAnonymousSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](/docs/client/account#accountUpdateEmail) or create an [OAuth2 session](/docs/client/account#accountCreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "createAnonymousSession", - "weight": 45, - "cookies": false, - "type": "", - "demo": "account/create-anonymous-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-anonymous.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }] - } - }, - "/account/sessions/magic-url": { - "post": { - "summary": "Create Magic URL session", - "operationId": "accountCreateMagicURLSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT /account/sessions/magic-url](/docs/client/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createMagicURLSession", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account/create-magic-u-r-l-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[USER_ID]" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https://example.com" - } - }, - "required": ["userId", "email"] - } - } - ] - }, - "put": { - "summary": "Create Magic URL session (confirmation)", - "operationId": "accountUpdateMagicURLSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](/docs/client/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateMagicURLSession", - "weight": 44, - "cookies": false, - "type": "", - "demo": "account/update-magic-u-r-l-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/account/sessions/oauth2/{provider}": { - "get": { - "summary": "Create Account Session with OAuth2", - "operationId": "accountCreateOAuth2Session", - "consumes": ["application/json"], - "produces": ["text/html"], - "tags": ["account"], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n", - "responses": { "301": { "description": "No content" } }, - "x-appwrite": { - "method": "createOAuth2Session", - "weight": 39, - "cookies": false, - "type": "webAuth", - "demo": "account/create-o-auth2session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-oauth2.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.", - "required": true, - "type": "string", - "x-example": "amazon", - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "default": "", - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "default": "", - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/sessions/{sessionId}": { - "get": { - "summary": "Get Session By ID", - "operationId": "accountGetSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "getSession", - "weight": 51, - "cookies": false, - "type": "", - "demo": "account/get-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Session (Refresh Tokens)", - "operationId": "accountUpdateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 58, - "cookies": false, - "type": "", - "demo": "account/update-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Account Session", - "operationId": "accountDeleteSession", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSession", - "weight": 57, - "cookies": false, - "type": "", - "demo": "account/delete-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - } - }, - "/account/verification": { - "post": { - "summary": "Create Email Verification", - "operationId": "accountCreateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createVerification", - "weight": 62, - "cookies": false, - "type": "", - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - } - }, - "required": ["url"] - } - } - ] - }, - "put": { - "summary": "Create Email Verification (confirmation)", - "operationId": "accountUpdateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "updateVerification", - "weight": 63, - "cookies": false, - "type": "", - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/avatars/browsers/{code}": { - "get": { - "summary": "Get Browser Icon", - "operationId": "avatarsGetBrowser", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getBrowser", - "weight": 65, - "cookies": false, - "type": "location", - "demo": "avatars/get-browser.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/credit-cards/{code}": { - "get": { - "summary": "Get Credit Card Icon", - "operationId": "avatarsGetCreditCard", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getCreditCard", - "weight": 64, - "cookies": false, - "type": "location", - "demo": "avatars/get-credit-card.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", - "required": true, - "type": "string", - "x-example": "amex", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/favicon": { - "get": { - "summary": "Get Favicon", - "operationId": "avatarsGetFavicon", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["avatars"], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFavicon", - "weight": 68, - "cookies": false, - "type": "location", - "demo": "avatars/get-favicon.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - } - ] - } - }, - "/avatars/flags/{code}": { - "get": { - "summary": "Get Country Flag", - "operationId": "avatarsGetFlag", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFlag", - "weight": 66, - "cookies": false, - "type": "location", - "demo": "avatars/get-flag.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "type": "string", - "x-example": "af", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/image": { - "get": { - "summary": "Get Image from URL", - "operationId": "avatarsGetImage", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["avatars"], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getImage", - "weight": 67, - "cookies": false, - "type": "location", - "demo": "avatars/get-image.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "/avatars/initials": { - "get": { - "summary": "Get User Initials", - "operationId": "avatarsGetInitials", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getInitials", - "weight": 70, - "cookies": false, - "type": "location", - "demo": "avatars/get-initials.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "type": "string", - "x-example": "[NAME]", - "default": "", - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "color", - "description": "Changes text color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - } - ] - } - }, - "/avatars/qr": { - "get": { - "summary": "Get QR Code", - "operationId": "avatarsGetQR", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getQR", - "weight": 69, - "cookies": false, - "type": "location", - "demo": "avatars/get-q-r.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "type": "string", - "x-example": "[TEXT]", - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 0 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "/database/collections/{collectionId}/documents": { - "get": { - "summary": "List Documents", - "operationId": "databaseListDocuments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Documents List", - "schema": { "$ref": "#/definitions/documentList" } - } - }, - "x-appwrite": { - "method": "listDocuments", - "weight": 95, - "cookies": false, - "type": "", - "demo": "database/list-documents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderAttributes", - "description": "Array of attributes used to sort results.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "orderTypes", - "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create Document", - "operationId": "databaseCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 94, - "cookies": false, - "type": "", - "demo": "database/create-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[DOCUMENT_ID]" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": ["documentId", "data"] - } - } - ] - } - }, - "/database/collections/{collectionId}/documents/{documentId}": { - "get": { - "summary": "Get Document", - "operationId": "databaseGetDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "getDocument", - "weight": 96, - "cookies": false, - "type": "", - "demo": "database/get-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Document", - "operationId": "databaseUpdateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "updateDocument", - "weight": 98, - "cookies": false, - "type": "", - "demo": "database/update-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": ["data"] - } - } - ] - }, - "delete": { - "summary": "Delete Document", - "operationId": "databaseDeleteDocument", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteDocument", - "weight": 99, - "cookies": false, - "type": "", - "demo": "database/delete-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}": { - "post": { - "summary": "Retry Build", - "operationId": "functionsRetryBuild", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "retryBuild", - "weight": 207, - "cookies": false, - "type": "", - "demo": "functions/retry-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/retry-build.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - }, - { - "name": "buildId", - "description": "Build unique ID.", - "required": true, - "type": "string", - "x-example": "[BUILD_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/executions": { - "get": { - "summary": "List Executions", - "operationId": "functionsListExecutions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Executions List", - "schema": { "$ref": "#/definitions/executionList" } - } - }, - "x-appwrite": { - "method": "listExecutions", - "weight": 205, - "cookies": false, - "type": "", - "demo": "functions/list-executions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Execution", - "operationId": "functionsCreateExecution", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "schema": { "$ref": "#/definitions/execution" } - } - }, - "x-appwrite": { - "method": "createExecution", - "weight": 204, - "cookies": false, - "type": "", - "demo": "functions/create-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "string", - "description": "String of custom data to send to function.", - "default": "", - "x-example": "[DATA]" - }, - "async": { - "type": "boolean", - "description": "Execute code asynchronously. Default value is true.", - "default": true, - "x-example": false - } - } - } - } - ] - } - }, - "/functions/{functionId}/executions/{executionId}": { - "get": { - "summary": "Get Execution", - "operationId": "functionsGetExecution", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { "$ref": "#/definitions/execution" } - } - }, - "x-appwrite": { - "method": "getExecution", - "weight": 206, - "cookies": false, - "type": "", - "demo": "functions/get-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "[EXECUTION_ID]", - "in": "path" - } - ] - } - }, - "/locale": { - "get": { - "summary": "Get User Locale", - "operationId": "localeGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "schema": { "$ref": "#/definitions/locale" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 100, - "cookies": false, - "type": "", - "demo": "locale/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-locale.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/locale/continents": { - "get": { - "summary": "List Continents", - "operationId": "localeGetContinents", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "schema": { "$ref": "#/definitions/continentList" } - } - }, - "x-appwrite": { - "method": "getContinents", - "weight": 104, - "cookies": false, - "type": "", - "demo": "locale/get-continents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/locale/countries": { - "get": { - "summary": "List Countries", - "operationId": "localeGetCountries", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { "$ref": "#/definitions/countryList" } - } - }, - "x-appwrite": { - "method": "getCountries", - "weight": 101, - "cookies": false, - "type": "", - "demo": "locale/get-countries.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/locale/countries/eu": { - "get": { - "summary": "List EU Countries", - "operationId": "localeGetCountriesEU", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { "$ref": "#/definitions/countryList" } - } - }, - "x-appwrite": { - "method": "getCountriesEU", - "weight": 102, - "cookies": false, - "type": "", - "demo": "locale/get-countries-e-u.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/locale/countries/phones": { - "get": { - "summary": "List Countries Phone Codes", - "operationId": "localeGetCountriesPhones", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "schema": { "$ref": "#/definitions/phoneList" } - } - }, - "x-appwrite": { - "method": "getCountriesPhones", - "weight": 103, - "cookies": false, - "type": "", - "demo": "locale/get-countries-phones.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/locale/currencies": { - "get": { - "summary": "List Currencies", - "operationId": "localeGetCurrencies", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "schema": { "$ref": "#/definitions/currencyList" } - } - }, - "x-appwrite": { - "method": "getCurrencies", - "weight": 105, - "cookies": false, - "type": "", - "demo": "locale/get-currencies.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/locale/languages": { - "get": { - "summary": "List Languages", - "operationId": "localeGetLanguages", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "schema": { "$ref": "#/definitions/languageList" } - } - }, - "x-appwrite": { - "method": "getLanguages", - "weight": 106, - "cookies": false, - "type": "", - "demo": "locale/get-languages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/storage/buckets/{bucketId}/files": { - "get": { - "summary": "List Files", - "operationId": "storageListFiles", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Files List", - "schema": { "$ref": "#/definitions/fileList" } - } - }, - "x-appwrite": { - "method": "listFiles", - "weight": 156, - "cookies": false, - "type": "", - "demo": "storage/list-files.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create File", - "operationId": "storageCreateFile", - "consumes": ["multipart/form-data"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "createFile", - "weight": 155, - "cookies": false, - "type": "upload", - "demo": "storage/create-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "x-upload-id": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "formData" - }, - { - "name": "file", - "description": "Binary file.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "read", - "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "x-example": "[\"role:all\"]", - "in": "formData" - }, - { - "name": "write", - "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "x-example": "[\"role:all\"]", - "in": "formData" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}": { - "get": { - "summary": "Get File", - "operationId": "storageGetFile", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "getFile", - "weight": 157, - "cookies": false, - "type": "", - "demo": "storage/get-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update File", - "operationId": "storageUpdateFile", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "updateFile", - "weight": 161, - "cookies": false, - "type": "", - "demo": "storage/update-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete File", - "operationId": "storageDeleteFile", - "consumes": ["application/json"], - "produces": [], - "tags": ["storage"], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteFile", - "weight": 162, - "cookies": false, - "type": "", - "demo": "storage/delete-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/download": { - "get": { - "summary": "Get File for Download", - "operationId": "storageGetFileDownload", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["storage"], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { "description": "File", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFileDownload", - "weight": 159, - "cookies": false, - "type": "location", - "demo": "storage/get-file-download.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/preview": { - "get": { - "summary": "Get File Preview", - "operationId": "storageGetFilePreview", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["storage"], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFilePreview", - "weight": 158, - "cookies": false, - "type": "location", - "demo": "storage/get-file-preview.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "type": "string", - "x-example": "center", - "default": "center", - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpg", - "default": "", - "in": "query" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/view": { - "get": { - "summary": "Get File for View", - "operationId": "storageGetFileView", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["storage"], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { "description": "File", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFileView", - "weight": 160, - "cookies": false, - "type": "location", - "demo": "storage/get-file-view.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/teams": { - "get": { - "summary": "List Teams", - "operationId": "teamsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Teams List", - "schema": { "$ref": "#/definitions/teamList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 166, - "cookies": false, - "type": "", - "demo": "teams/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-teams.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Team", - "operationId": "teamsCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 165, - "cookies": false, - "type": "", - "demo": "teams/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[TEAM_ID]" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", - "default": ["owner"], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["teamId", "name"] - } - } - ] - } - }, - "/teams/{teamId}": { - "get": { - "summary": "Get Team", - "operationId": "teamsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 167, - "cookies": false, - "type": "", - "demo": "teams/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Team", - "operationId": "teamsUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Update a team using its ID. Only members with the owner role can update the team.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "update", - "weight": 168, - "cookies": false, - "type": "", - "demo": "teams/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - }, - "delete": { - "summary": "Delete Team", - "operationId": "teamsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 169, - "cookies": false, - "type": "", - "demo": "teams/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships": { - "get": { - "summary": "Get Team Memberships", - "operationId": "teamsGetMemberships", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMemberships", - "weight": 171, - "cookies": false, - "type": "", - "demo": "teams/get-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-members.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Team Membership", - "operationId": "teamsCreateMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.", - "responses": { - "201": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "createMembership", - "weight": 170, - "cookies": false, - "type": "", - "demo": "teams/create-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "default": null, - "x-example": "email@example.com" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["email", "roles", "url"] - } - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}": { - "get": { - "summary": "Get Team Membership", - "operationId": "teamsGetMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 172, - "cookies": false, - "type": "", - "demo": "teams/get-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-member.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Membership Roles", - "operationId": "teamsUpdateMembershipRoles", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions).", - "responses": { - "200": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "updateMembershipRoles", - "weight": 173, - "cookies": false, - "type": "", - "demo": "teams/update-membership-roles.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-roles.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["roles"] - } - } - ] - }, - "delete": { - "summary": "Delete Team Membership", - "operationId": "teamsDeleteMembership", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteMembership", - "weight": 175, - "cookies": false, - "type": "", - "demo": "teams/delete-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}/status": { - "patch": { - "summary": "Update Team Membership Status", - "operationId": "teamsUpdateMembershipStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "updateMembershipStatus", - "weight": 174, - "cookies": false, - "type": "", - "demo": "teams/update-membership-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "database", - "description": "The Database service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - } - ], - "definitions": { - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { "type": "object", "$ref": "#/definitions/document" }, - "x-example": "" - } - }, - "required": ["total", "documents"] - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { "type": "object", "$ref": "#/definitions/session" }, - "x-example": "" - } - }, - "required": ["total", "sessions"] - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { "type": "object", "$ref": "#/definitions/log" }, - "x-example": "" - } - }, - "required": ["total", "logs"] - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { "type": "object", "$ref": "#/definitions/file" }, - "x-example": "" - } - }, - "required": ["total", "files"] - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { "type": "object", "$ref": "#/definitions/team" }, - "x-example": "" - } - }, - "required": ["total", "teams"] - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { "type": "object", "$ref": "#/definitions/membership" }, - "x-example": "" - } - }, - "required": ["total", "memberships"] - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { "type": "object", "$ref": "#/definitions/execution" }, - "x-example": "" - } - }, - "required": ["total", "executions"] - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { "type": "object", "$ref": "#/definitions/country" }, - "x-example": "" - } - }, - "required": ["total", "countries"] - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { "type": "object", "$ref": "#/definitions/continent" }, - "x-example": "" - } - }, - "required": ["total", "continents"] - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { "type": "object", "$ref": "#/definitions/language" }, - "x-example": "" - } - }, - "required": ["total", "languages"] - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { "type": "object", "$ref": "#/definitions/currency" }, - "x-example": "" - } - }, - "required": ["total", "currencies"] - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { "type": "object", "$ref": "#/definitions/phone" }, - "x-example": "" - } - }, - "required": ["total", "phones"] - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$collection": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e" - }, - "$read": { - "type": "array", - "description": "Document read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "Document write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - } - }, - "additionalProperties": true, - "required": ["$id", "$collection", "$read", "$write"] - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User Email.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "integer", - "description": "Log creation time in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ] - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "registration": { - "type": "integer", - "description": "User registration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "passwordUpdate": { - "type": "integer", - "description": "Unix timestamp of the most recent password update", - "x-example": 1592981250, - "format": "int32" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { "theme": "pink", "timezone": "UTC" }, - "items": { "type": "object", "$ref": "#/definitions/preferences" } - } - }, - "required": [ - "$id", - "name", - "registration", - "status", - "passwordUpdate", - "email", - "emailVerification", - "prefs" - ] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "integer", - "description": "Session expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "integer", - "description": "Date, the Unix timestamp of when the access token expires.", - "x-example": 1592981250, - "format": "int32" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - } - }, - "required": [ - "$id", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "integer", - "description": "Token expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - } - }, - "required": ["$id", "userId", "secret", "expire"] - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": ["jwt"] - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the Europian Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ] - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "dateCreated": { - "type": "integer", - "description": "File creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$read", - "$write", - "name", - "dateCreated", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "dateCreated": { - "type": "integer", - "description": "Team creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - } - }, - "required": ["$id", "name", "dateCreated", "total"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "VIP" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "invited": { - "type": "integer", - "description": "Date, the user has been invited to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "joined": { - "type": "integer", - "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { "type": "string" }, - "x-example": "admin" - } - }, - "required": [ - "$id", - "userId", - "teamId", - "name", - "email", - "invited", - "joined", - "confirm", - "roles" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Execution read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "dateCreated": { - "type": "integer", - "description": "The execution creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "statusCode": { - "type": "integer", - "description": "The script status code.", - "x-example": 0, - "format": "int32" - }, - "stdout": { - "type": "string", - "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", - "x-example": "" - }, - "time": { - "type": "number", - "description": "The script execution time in seconds.", - "x-example": 0.4, - "format": "double" - } - }, - "required": [ - "$id", - "$read", - "functionId", - "dateCreated", - "trigger", - "status", - "statusCode", - "stdout", - "stderr", - "time" - ] - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": ["name", "code"] - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": ["name", "code"] - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": ["name", "code", "nativeName"] - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ] - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": ["code", "countryCode", "countryName"] - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https://appwrite.io/docs" - } -} +{"swagger":"2.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","required":true,"x-upload-id":true,"type":"string","x-example":"[FILE_ID]","in":"formData"},{"name":"file","description":"Binary file.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":["owner"],"x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["email","roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"definitions":{"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 43c05d655c..8985f3947b 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1,12998 +1 @@ -{ - "swagger": "2.0", - "info": { - "version": "0.13.0", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "termsOfService": "https://appwrite.io/policy/terms", - "contact": { - "name": "Appwrite Team", - "url": "https://appwrite.io/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" - } - }, - "host": "HOSTNAME", - "basePath": "/v1", - "schemes": ["https"], - "consumes": ["application/json", "multipart/form-data"], - "produces": ["application/json"], - "securityDefinitions": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { "demo": "5df5acd0d48c2" } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { "demo": "919c2d18fb5d4...a2ae413da83346ad2" } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { "demo": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..." } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { "demo": "en" } - }, - "Mode": { - "type": "apiKey", - "name": "X-Appwrite-Mode", - "description": "", - "in": "header", - "x-appwrite": { "demo": "" } - } - }, - "paths": { - "/account": { - "get": { - "summary": "Get Account", - "operationId": "accountGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user data as JSON object.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "post": { - "summary": "Create Account", - "operationId": "accountCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](/docs/client/account#accountCreateSession).", - "responses": { - "201": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 37, - "cookies": false, - "type": "", - "demo": "account/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[USER_ID]" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - }, - "delete": { - "summary": "Delete Account", - "operationId": "accountDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 56, - "cookies": false, - "type": "", - "demo": "account/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/account/email": { - "patch": { - "summary": "Update Account Email", - "operationId": "accountUpdateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateEmail", - "weight": 54, - "cookies": false, - "type": "", - "demo": "account/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - ] - } - }, - "/account/jwt": { - "post": { - "summary": "Create Account JWT", - "operationId": "accountCreateJWT", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", - "responses": { - "201": { - "description": "JWT", - "schema": { "$ref": "#/definitions/jwt" } - } - }, - "x-appwrite": { - "method": "createJWT", - "weight": 46, - "cookies": false, - "type": "", - "demo": "account/create-j-w-t.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-jwt.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }] - } - }, - "/account/logs": { - "get": { - "summary": "Get Account Logs", - "operationId": "accountGetLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "schema": { "$ref": "#/definitions/logList" } - } - }, - "x-appwrite": { - "method": "getLogs", - "weight": 50, - "cookies": false, - "type": "", - "demo": "account/get-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "limit", - "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/account/name": { - "patch": { - "summary": "Update Account Name", - "operationId": "accountUpdateName", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 52, - "cookies": false, - "type": "", - "demo": "account/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - } - }, - "/account/password": { - "patch": { - "summary": "Update Account Password", - "operationId": "accountUpdatePassword", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 53, - "cookies": false, - "type": "", - "demo": "account/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password" - } - }, - "required": ["password"] - } - } - ] - } - }, - "/account/prefs": { - "get": { - "summary": "Get Account Preferences", - "operationId": "accountGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user preferences as a key-value object.", - "responses": { - "200": { - "description": "Preferences", - "schema": { "$ref": "#/definitions/preferences" } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "patch": { - "summary": "Update Account Preferences", - "operationId": "accountUpdatePrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 55, - "cookies": false, - "type": "", - "demo": "account/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - ] - } - }, - "/account/recovery": { - "post": { - "summary": "Create Password Recovery", - "operationId": "accountCreateRecovery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createRecovery", - "weight": 60, - "cookies": false, - "type": "", - "demo": "account/create-recovery.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},email:{param-email}", "ip:{ip}"], - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - } - }, - "required": ["email", "url"] - } - } - ] - }, - "put": { - "summary": "Create Password Recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "updateRecovery", - "weight": 61, - "cookies": false, - "type": "", - "demo": "account/update-recovery.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "default": null, - "x-example": "[SECRET]" - }, - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "passwordAgain": { - "type": "string", - "description": "Repeat new user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["userId", "secret", "password", "passwordAgain"] - } - } - ] - } - }, - "/account/sessions": { - "get": { - "summary": "Get Account Sessions", - "operationId": "accountGetSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user list of active sessions across different devices.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { "$ref": "#/definitions/sessionList" } - } - }, - "x-appwrite": { - "method": "getSessions", - "weight": 49, - "cookies": false, - "type": "", - "demo": "account/get-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "post": { - "summary": "Create Account Session", - "operationId": "accountCreateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.", - "responses": { - "201": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "createSession", - "weight": 38, - "cookies": false, - "type": "", - "demo": "account/create-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - ] - }, - "delete": { - "summary": "Delete All Account Sessions", - "operationId": "accountDeleteSessions", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSessions", - "weight": 59, - "cookies": false, - "type": "", - "demo": "account/delete-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/account/sessions/anonymous": { - "post": { - "summary": "Create Anonymous Session", - "operationId": "accountCreateAnonymousSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](/docs/client/account#accountUpdateEmail) or create an [OAuth2 session](/docs/client/account#accountCreateOAuth2Session).", - "responses": { - "201": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "createAnonymousSession", - "weight": 45, - "cookies": false, - "type": "", - "demo": "account/create-anonymous-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-anonymous.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }] - } - }, - "/account/sessions/magic-url": { - "post": { - "summary": "Create Magic URL session", - "operationId": "accountCreateMagicURLSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT /account/sessions/magic-url](/docs/client/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createMagicURLSession", - "weight": 43, - "cookies": false, - "type": "", - "demo": "account/create-magic-u-r-l-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},email:{param-email}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[USER_ID]" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": "", - "x-example": "https://example.com" - } - }, - "required": ["userId", "email"] - } - } - ] - }, - "put": { - "summary": "Create Magic URL session (confirmation)", - "operationId": "accountUpdateMagicURLSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](/docs/client/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateMagicURLSession", - "weight": 44, - "cookies": false, - "type": "", - "demo": "account/update-magic-u-r-l-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-magic-url-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/account/sessions/oauth2/{provider}": { - "get": { - "summary": "Create Account Session with OAuth2", - "operationId": "accountCreateOAuth2Session", - "consumes": ["application/json"], - "produces": ["text/html"], - "tags": ["account"], - "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n", - "responses": { "301": { "description": "No content" } }, - "x-appwrite": { - "method": "createOAuth2Session", - "weight": 39, - "cookies": false, - "type": "webAuth", - "demo": "account/create-o-auth2session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-oauth2.md", - "rate-limit": 50, - "rate-time": 3600, - "rate-key": "ip:{ip}", - "scope": "public", - "platforms": ["client"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, yahoo, yammer, yandex, wordpress, stripe.", - "required": true, - "type": "string", - "x-example": "amazon", - "in": "path" - }, - { - "name": "success", - "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "default": "", - "in": "query" - }, - { - "name": "failure", - "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "required": false, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "default": "", - "in": "query" - }, - { - "name": "scopes", - "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - } - }, - "/account/sessions/{sessionId}": { - "get": { - "summary": "Get Session By ID", - "operationId": "accountGetSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "getSession", - "weight": 51, - "cookies": false, - "type": "", - "demo": "account/get-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Session (Refresh Tokens)", - "operationId": "accountUpdateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 58, - "cookies": false, - "type": "", - "demo": "account/update-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Account Session", - "operationId": "accountDeleteSession", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSession", - "weight": 57, - "cookies": false, - "type": "", - "demo": "account/delete-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - } - }, - "/account/verification": { - "post": { - "summary": "Create Email Verification", - "operationId": "accountCreateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createVerification", - "weight": 62, - "cookies": false, - "type": "", - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - } - }, - "required": ["url"] - } - } - ] - }, - "put": { - "summary": "Create Email Verification (confirmation)", - "operationId": "accountUpdateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "updateVerification", - "weight": 63, - "cookies": false, - "type": "", - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/avatars/browsers/{code}": { - "get": { - "summary": "Get Browser Icon", - "operationId": "avatarsGetBrowser", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getBrowser", - "weight": 65, - "cookies": false, - "type": "location", - "demo": "avatars/get-browser.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/credit-cards/{code}": { - "get": { - "summary": "Get Credit Card Icon", - "operationId": "avatarsGetCreditCard", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getCreditCard", - "weight": 64, - "cookies": false, - "type": "location", - "demo": "avatars/get-credit-card.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", - "required": true, - "type": "string", - "x-example": "amex", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/favicon": { - "get": { - "summary": "Get Favicon", - "operationId": "avatarsGetFavicon", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["avatars"], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFavicon", - "weight": 68, - "cookies": false, - "type": "location", - "demo": "avatars/get-favicon.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - } - ] - } - }, - "/avatars/flags/{code}": { - "get": { - "summary": "Get Country Flag", - "operationId": "avatarsGetFlag", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFlag", - "weight": 66, - "cookies": false, - "type": "location", - "demo": "avatars/get-flag.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "type": "string", - "x-example": "af", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/image": { - "get": { - "summary": "Get Image from URL", - "operationId": "avatarsGetImage", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["avatars"], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getImage", - "weight": 67, - "cookies": false, - "type": "location", - "demo": "avatars/get-image.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "/avatars/initials": { - "get": { - "summary": "Get User Initials", - "operationId": "avatarsGetInitials", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getInitials", - "weight": 70, - "cookies": false, - "type": "location", - "demo": "avatars/get-initials.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "type": "string", - "x-example": "[NAME]", - "default": "", - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "color", - "description": "Changes text color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - } - ] - } - }, - "/avatars/qr": { - "get": { - "summary": "Get QR Code", - "operationId": "avatarsGetQR", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getQR", - "weight": 69, - "cookies": false, - "type": "location", - "demo": "avatars/get-q-r.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "type": "string", - "x-example": "[TEXT]", - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 0 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "/database/collections": { - "get": { - "summary": "List Collections", - "operationId": "databaseListCollections", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Collections List", - "schema": { "$ref": "#/definitions/collectionList" } - } - }, - "x-appwrite": { - "method": "listCollections", - "weight": 72, - "cookies": false, - "type": "", - "demo": "database/list-collections.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Collection", - "operationId": "databaseCreateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Collection.", - "responses": { - "201": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "createCollection", - "weight": 71, - "cookies": false, - "type": "", - "demo": "database/create-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[COLLECTION_ID]" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "document" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": [ - "collectionId", - "name", - "permission", - "read", - "write" - ] - } - } - ] - } - }, - "/database/collections/{collectionId}": { - "get": { - "summary": "Get Collection", - "operationId": "databaseGetCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "getCollection", - "weight": 73, - "cookies": false, - "type": "", - "demo": "database/get-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Collection", - "operationId": "databaseUpdateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "updateCollection", - "weight": 77, - "cookies": false, - "type": "", - "demo": "database/update-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "document" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled?", - "default": true, - "x-example": false - } - }, - "required": ["name", "permission"] - } - } - ] - }, - "delete": { - "summary": "Delete Collection", - "operationId": "databaseDeleteCollection", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteCollection", - "weight": 78, - "cookies": false, - "type": "", - "demo": "database/delete-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/attributes": { - "get": { - "summary": "List Attributes", - "operationId": "databaseListAttributes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "Attributes List", - "schema": { "$ref": "#/definitions/attributeList" } - } - }, - "x-appwrite": { - "method": "listAttributes", - "weight": 87, - "cookies": false, - "type": "", - "demo": "database/list-attributes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/attributes/boolean": { - "post": { - "summary": "Create Boolean Attribute", - "operationId": "databaseCreateBooleanAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a boolean attribute.\n", - "responses": { - "201": { - "description": "AttributeBoolean", - "schema": { "$ref": "#/definitions/attributeBoolean" } - } - }, - "x-appwrite": { - "method": "createBooleanAttribute", - "weight": 86, - "cookies": false, - "type": "", - "demo": "database/create-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/email": { - "post": { - "summary": "Create Email Attribute", - "operationId": "databaseCreateEmailAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create an email attribute.\n", - "responses": { - "201": { - "description": "AttributeEmail", - "schema": { "$ref": "#/definitions/attributeEmail" } - } - }, - "x-appwrite": { - "method": "createEmailAttribute", - "weight": 80, - "cookies": false, - "type": "", - "demo": "database/create-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/enum": { - "post": { - "summary": "Create Enum Attribute", - "operationId": "databaseCreateEnumAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "201": { - "description": "AttributeEnum", - "schema": { "$ref": "#/definitions/attributeEnum" } - } - }, - "x-appwrite": { - "method": "createEnumAttribute", - "weight": 81, - "cookies": false, - "type": "", - "demo": "database/create-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-attribute-enum.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "[DEFAULT]" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "elements", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/float": { - "post": { - "summary": "Create Float Attribute", - "operationId": "databaseCreateFloatAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "201": { - "description": "AttributeFloat", - "schema": { "$ref": "#/definitions/attributeFloat" } - } - }, - "x-appwrite": { - "method": "createFloatAttribute", - "weight": 85, - "cookies": false, - "type": "", - "demo": "database/create-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/integer": { - "post": { - "summary": "Create Integer Attribute", - "operationId": "databaseCreateIntegerAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "201": { - "description": "AttributeInteger", - "schema": { "$ref": "#/definitions/attributeInteger" } - } - }, - "x-appwrite": { - "method": "createIntegerAttribute", - "weight": 84, - "cookies": false, - "type": "", - "demo": "database/create-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/ip": { - "post": { - "summary": "Create IP Address Attribute", - "operationId": "databaseCreateIpAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create IP address attribute.\n", - "responses": { - "201": { - "description": "AttributeIP", - "schema": { "$ref": "#/definitions/attributeIp" } - } - }, - "x-appwrite": { - "method": "createIpAttribute", - "weight": 82, - "cookies": false, - "type": "", - "demo": "database/create-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/string": { - "post": { - "summary": "Create String Attribute", - "operationId": "databaseCreateStringAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a string attribute.\n", - "responses": { - "201": { - "description": "AttributeString", - "schema": { "$ref": "#/definitions/attributeString" } - } - }, - "x-appwrite": { - "method": "createStringAttribute", - "weight": 79, - "cookies": false, - "type": "", - "demo": "database/create-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "[DEFAULT]" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "size", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/url": { - "post": { - "summary": "Create URL Attribute", - "operationId": "databaseCreateUrlAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a URL attribute.\n", - "responses": { - "201": { - "description": "AttributeURL", - "schema": { "$ref": "#/definitions/attributeUrl" } - } - }, - "x-appwrite": { - "method": "createUrlAttribute", - "weight": 83, - "cookies": false, - "type": "", - "demo": "database/create-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https://example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/{key}": { - "get": { - "summary": "Get Attribute", - "operationId": "databaseGetAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString", - "schema": { - "x-oneOf": [ - { "$ref": "#/definitions/attributeBoolean" }, - { "$ref": "#/definitions/attributeInteger" }, - { "$ref": "#/definitions/attributeFloat" }, - { "$ref": "#/definitions/attributeEmail" }, - { "$ref": "#/definitions/attributeEnum" }, - { "$ref": "#/definitions/attributeUrl" }, - { "$ref": "#/definitions/attributeIp" }, - { "$ref": "#/definitions/attributeString" } - ] - } - } - }, - "x-appwrite": { - "method": "getAttribute", - "weight": 88, - "cookies": false, - "type": "", - "demo": "database/get-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Attribute", - "operationId": "databaseDeleteAttribute", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteAttribute", - "weight": 89, - "cookies": false, - "type": "", - "demo": "database/delete-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/documents": { - "get": { - "summary": "List Documents", - "operationId": "databaseListDocuments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Documents List", - "schema": { "$ref": "#/definitions/documentList" } - } - }, - "x-appwrite": { - "method": "listDocuments", - "weight": 95, - "cookies": false, - "type": "", - "demo": "database/list-documents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderAttributes", - "description": "Array of attributes used to sort results.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "orderTypes", - "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create Document", - "operationId": "databaseCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 94, - "cookies": false, - "type": "", - "demo": "database/create-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[DOCUMENT_ID]" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": ["documentId", "data"] - } - } - ] - } - }, - "/database/collections/{collectionId}/documents/{documentId}": { - "get": { - "summary": "Get Document", - "operationId": "databaseGetDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "getDocument", - "weight": 96, - "cookies": false, - "type": "", - "demo": "database/get-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Document", - "operationId": "databaseUpdateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "updateDocument", - "weight": 98, - "cookies": false, - "type": "", - "demo": "database/update-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": ["data"] - } - } - ] - }, - "delete": { - "summary": "Delete Document", - "operationId": "databaseDeleteDocument", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteDocument", - "weight": 99, - "cookies": false, - "type": "", - "demo": "database/delete-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/documents/{documentId}/logs": { - "get": { - "summary": "List Document Logs", - "operationId": "databaseListDocumentLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get the document activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { "$ref": "#/definitions/logList" } - } - }, - "x-appwrite": { - "method": "listDocumentLogs", - "weight": 97, - "cookies": false, - "type": "", - "demo": "database/list-document-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/database/collections/{collectionId}/indexes": { - "get": { - "summary": "List Indexes", - "operationId": "databaseListIndexes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "Indexes List", - "schema": { "$ref": "#/definitions/indexList" } - } - }, - "x-appwrite": { - "method": "listIndexes", - "weight": 91, - "cookies": false, - "type": "", - "demo": "database/list-indexes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - }, - "post": { - "summary": "Create Index", - "operationId": "databaseCreateIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "201": { - "description": "Index", - "schema": { "$ref": "#/definitions/index" } - } - }, - "x-appwrite": { - "method": "createIndex", - "weight": 90, - "cookies": false, - "type": "", - "demo": "database/create-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key" - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "orders": { - "type": "array", - "description": "Array of index orders.", - "default": [], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["key", "type", "attributes"] - } - } - ] - } - }, - "/database/collections/{collectionId}/indexes/{key}": { - "get": { - "summary": "Get Index", - "operationId": "databaseGetIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "Index", - "schema": { "$ref": "#/definitions/index" } - } - }, - "x-appwrite": { - "method": "getIndex", - "weight": 92, - "cookies": false, - "type": "", - "demo": "database/get-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Index", - "operationId": "databaseDeleteIndex", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteIndex", - "weight": 93, - "cookies": false, - "type": "", - "demo": "database/delete-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/logs": { - "get": { - "summary": "List Collection Logs", - "operationId": "databaseListCollectionLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get the collection activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { "$ref": "#/definitions/logList" } - } - }, - "x-appwrite": { - "method": "listCollectionLogs", - "weight": 76, - "cookies": false, - "type": "", - "demo": "database/list-collection-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-collection-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/database/usage": { - "get": { - "summary": "Get usage stats for the database", - "operationId": "databaseGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "UsageDatabase", - "schema": { "$ref": "#/definitions/usageDatabase" } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 74, - "cookies": false, - "type": "", - "demo": "database/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - } - ] - } - }, - "/database/{collectionId}/usage": { - "get": { - "summary": "Get usage stats for a collection", - "operationId": "databaseGetCollectionUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "UsageCollection", - "schema": { "$ref": "#/definitions/usageCollection" } - } - }, - "x-appwrite": { - "method": "getCollectionUsage", - "weight": 75, - "cookies": false, - "type": "", - "demo": "database/get-collection-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - }, - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - } - }, - "/functions": { - "get": { - "summary": "List Functions", - "operationId": "functionsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Functions List", - "schema": { "$ref": "#/definitions/functionList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 193, - "cookies": false, - "type": "", - "demo": "functions/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Function", - "operationId": "functionsCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new function. You can pass a list of [permissions](/docs/permissions) to allow different project users or team with access to execute the function using the client API.", - "responses": { - "201": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 192, - "cookies": false, - "type": "", - "demo": "functions/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "functionId": { - "type": "string", - "description": "Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[FUNCTION_ID]" - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "execute": { - "type": "array", - "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5" - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "default": 15, - "x-example": 1 - } - }, - "required": ["functionId", "name", "execute", "runtime"] - } - } - ] - } - }, - "/functions/runtimes": { - "get": { - "summary": "List the currently active function runtimes.", - "operationId": "functionsListRuntimes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all runtimes that are currently active on your instance.", - "responses": { - "200": { - "description": "Runtimes List", - "schema": { "$ref": "#/definitions/runtimeList" } - } - }, - "x-appwrite": { - "method": "listRuntimes", - "weight": 194, - "cookies": false, - "type": "", - "demo": "functions/list-runtimes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-runtimes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/functions/{functionId}": { - "get": { - "summary": "Get Function", - "operationId": "functionsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 195, - "cookies": false, - "type": "", - "demo": "functions/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Function", - "operationId": "functionsUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Update function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "update", - "weight": 197, - "cookies": false, - "type": "", - "demo": "functions/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "execute": { - "type": "array", - "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "default": 15, - "x-example": 1 - } - }, - "required": ["name", "execute"] - } - } - ] - }, - "delete": { - "summary": "Delete Function", - "operationId": "functionsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a function by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 199, - "cookies": false, - "type": "", - "demo": "functions/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/deployments": { - "get": { - "summary": "List Deployments", - "operationId": "functionsListDeployments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the project's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { "$ref": "#/definitions/deploymentList" } - } - }, - "x-appwrite": { - "method": "listDeployments", - "weight": 201, - "cookies": false, - "type": "", - "demo": "functions/list-deployments.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Deployment", - "operationId": "functionsCreateDeployment", - "consumes": ["multipart/form-data"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](/docs/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.", - "responses": { - "201": { - "description": "Deployment", - "schema": { "$ref": "#/definitions/deployment" } - } - }, - "x-appwrite": { - "method": "createDeployment", - "weight": 200, - "cookies": false, - "type": "", - "demo": "functions/create-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": true, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "entrypoint", - "description": "Entrypoint File.", - "required": true, - "type": "string", - "x-example": "[ENTRYPOINT]", - "in": "formData" - }, - { - "name": "code", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "activate", - "description": "Automatically activate the deployment when it is finished building.", - "required": true, - "type": "boolean", - "x-example": false, - "in": "formData" - } - ] - } - }, - "/functions/{functionId}/deployments/{deploymentId}": { - "get": { - "summary": "Get Deployment", - "operationId": "functionsGetDeployment", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a code deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { "$ref": "#/definitions/deploymentList" } - } - }, - "x-appwrite": { - "method": "getDeployment", - "weight": 202, - "cookies": false, - "type": "", - "demo": "functions/get-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Function Deployment", - "operationId": "functionsUpdateDeployment", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.", - "responses": { - "200": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "updateDeployment", - "weight": 198, - "cookies": false, - "type": "", - "demo": "functions/update-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Deployment", - "operationId": "functionsDeleteDeployment", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a code deployment by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteDeployment", - "weight": 203, - "cookies": false, - "type": "", - "demo": "functions/delete-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}": { - "post": { - "summary": "Retry Build", - "operationId": "functionsRetryBuild", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "retryBuild", - "weight": 207, - "cookies": false, - "type": "", - "demo": "functions/retry-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/retry-build.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - }, - { - "name": "buildId", - "description": "Build unique ID.", - "required": true, - "type": "string", - "x-example": "[BUILD_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/executions": { - "get": { - "summary": "List Executions", - "operationId": "functionsListExecutions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Executions List", - "schema": { "$ref": "#/definitions/executionList" } - } - }, - "x-appwrite": { - "method": "listExecutions", - "weight": 205, - "cookies": false, - "type": "", - "demo": "functions/list-executions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Execution", - "operationId": "functionsCreateExecution", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "schema": { "$ref": "#/definitions/execution" } - } - }, - "x-appwrite": { - "method": "createExecution", - "weight": 204, - "cookies": false, - "type": "", - "demo": "functions/create-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "string", - "description": "String of custom data to send to function.", - "default": "", - "x-example": "[DATA]" - }, - "async": { - "type": "boolean", - "description": "Execute code asynchronously. Default value is true.", - "default": true, - "x-example": false - } - } - } - } - ] - } - }, - "/functions/{functionId}/executions/{executionId}": { - "get": { - "summary": "Get Execution", - "operationId": "functionsGetExecution", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { "$ref": "#/definitions/execution" } - } - }, - "x-appwrite": { - "method": "getExecution", - "weight": 206, - "cookies": false, - "type": "", - "demo": "functions/get-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "[EXECUTION_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/usage": { - "get": { - "summary": "Get Function Usage", - "operationId": "functionsGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "", - "responses": { - "200": { - "description": "UsageFunctions", - "schema": { "$ref": "#/definitions/usageFunctions" } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 196, - "cookies": false, - "type": "", - "demo": "functions/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - } - ] - } - }, - "/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite HTTP server is up and responsive.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 107, - "cookies": false, - "type": "", - "demo": "health/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/anti-virus": { - "get": { - "summary": "Get Antivirus", - "operationId": "healthGetAntivirus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite Antivirus server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Antivirus", - "schema": { "$ref": "#/definitions/healthAntivirus" } - } - }, - "x-appwrite": { - "method": "getAntivirus", - "weight": 118, - "cookies": false, - "type": "", - "demo": "health/get-antivirus.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-anti-virus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/cache": { - "get": { - "summary": "Get Cache", - "operationId": "healthGetCache", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite in-memory cache server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "getCache", - "weight": 110, - "cookies": false, - "type": "", - "demo": "health/get-cache.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-cache.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite database server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "getDB", - "weight": 109, - "cookies": false, - "type": "", - "demo": "health/get-d-b.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-db.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/certificates": { - "get": { - "summary": "Get Certificates Queue", - "operationId": "healthGetQueueCertificates", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueCertificates", - "weight": 115, - "cookies": false, - "type": "", - "demo": "health/get-queue-certificates.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-certificates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/functions": { - "get": { - "summary": "Get Functions Queue", - "operationId": "healthGetQueueFunctions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueFunctions", - "weight": 116, - "cookies": false, - "type": "", - "demo": "health/get-queue-functions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/logs": { - "get": { - "summary": "Get Logs Queue", - "operationId": "healthGetQueueLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueLogs", - "weight": 113, - "cookies": false, - "type": "", - "demo": "health/get-queue-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/usage": { - "get": { - "summary": "Get Usage Queue", - "operationId": "healthGetQueueUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueUsage", - "weight": 114, - "cookies": false, - "type": "", - "demo": "health/get-queue-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/webhooks": { - "get": { - "summary": "Get Webhooks Queue", - "operationId": "healthGetQueueWebhooks", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueWebhooks", - "weight": 112, - "cookies": false, - "type": "", - "demo": "health/get-queue-webhooks.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-webhooks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/storage/local": { - "get": { - "summary": "Get Local Storage", - "operationId": "healthGetStorageLocal", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite local storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "getStorageLocal", - "weight": 117, - "cookies": false, - "type": "", - "demo": "health/get-storage-local.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-local.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/time": { - "get": { - "summary": "Get Time", - "operationId": "healthGetTime", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", - "responses": { - "200": { - "description": "Health Time", - "schema": { "$ref": "#/definitions/healthTime" } - } - }, - "x-appwrite": { - "method": "getTime", - "weight": 111, - "cookies": false, - "type": "", - "demo": "health/get-time.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-time.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/locale": { - "get": { - "summary": "Get User Locale", - "operationId": "localeGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "schema": { "$ref": "#/definitions/locale" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 100, - "cookies": false, - "type": "", - "demo": "locale/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-locale.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/continents": { - "get": { - "summary": "List Continents", - "operationId": "localeGetContinents", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "schema": { "$ref": "#/definitions/continentList" } - } - }, - "x-appwrite": { - "method": "getContinents", - "weight": 104, - "cookies": false, - "type": "", - "demo": "locale/get-continents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/countries": { - "get": { - "summary": "List Countries", - "operationId": "localeGetCountries", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { "$ref": "#/definitions/countryList" } - } - }, - "x-appwrite": { - "method": "getCountries", - "weight": 101, - "cookies": false, - "type": "", - "demo": "locale/get-countries.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/countries/eu": { - "get": { - "summary": "List EU Countries", - "operationId": "localeGetCountriesEU", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { "$ref": "#/definitions/countryList" } - } - }, - "x-appwrite": { - "method": "getCountriesEU", - "weight": 102, - "cookies": false, - "type": "", - "demo": "locale/get-countries-e-u.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/countries/phones": { - "get": { - "summary": "List Countries Phone Codes", - "operationId": "localeGetCountriesPhones", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "schema": { "$ref": "#/definitions/phoneList" } - } - }, - "x-appwrite": { - "method": "getCountriesPhones", - "weight": 103, - "cookies": false, - "type": "", - "demo": "locale/get-countries-phones.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/currencies": { - "get": { - "summary": "List Currencies", - "operationId": "localeGetCurrencies", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "schema": { "$ref": "#/definitions/currencyList" } - } - }, - "x-appwrite": { - "method": "getCurrencies", - "weight": 105, - "cookies": false, - "type": "", - "demo": "locale/get-currencies.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/languages": { - "get": { - "summary": "List Languages", - "operationId": "localeGetLanguages", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "schema": { "$ref": "#/definitions/languageList" } - } - }, - "x-appwrite": { - "method": "getLanguages", - "weight": 106, - "cookies": false, - "type": "", - "demo": "locale/get-languages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/projects": { - "get": { - "summary": "List Projects", - "operationId": "projectsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Projects List", - "schema": { "$ref": "#/definitions/projectList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 121, - "cookies": false, - "type": "", - "demo": "projects/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Results offset. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the project used as the starting point for the query, excluding the project itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Project", - "operationId": "projectsCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "201": { - "description": "Project", - "schema": { "$ref": "#/definitions/project" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 120, - "cookies": false, - "type": "", - "demo": "projects/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "projectId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[PROJECT_ID]" - }, - "name": { - "type": "string", - "description": "Project name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "teamId": { - "type": "string", - "description": "Team unique ID.", - "default": null, - "x-example": "[TEAM_ID]" - }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "default": "", - "x-example": "[DESCRIPTION]" - }, - "logo": { - "type": "string", - "description": "Project logo.", - "default": "", - "x-example": "[LOGO]" - }, - "url": { - "type": "string", - "description": "Project URL.", - "default": "", - "x-example": "https://example.com" - }, - "legalName": { - "type": "string", - "description": "Project legal Name. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_NAME]" - }, - "legalCountry": { - "type": "string", - "description": "Project legal Country. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_COUNTRY]" - }, - "legalState": { - "type": "string", - "description": "Project legal State. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_STATE]" - }, - "legalCity": { - "type": "string", - "description": "Project legal City. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_CITY]" - }, - "legalAddress": { - "type": "string", - "description": "Project legal Address. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_ADDRESS]" - }, - "legalTaxId": { - "type": "string", - "description": "Project legal Tax ID. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_TAX_ID]" - } - }, - "required": ["projectId", "name", "teamId"] - } - } - ] - } - }, - "/projects/{projectId}": { - "get": { - "summary": "Get Project", - "operationId": "projectsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { "$ref": "#/definitions/project" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 122, - "cookies": false, - "type": "", - "demo": "projects/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Project", - "operationId": "projectsUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { "$ref": "#/definitions/project" } - } - }, - "x-appwrite": { - "method": "update", - "weight": 124, - "cookies": false, - "type": "", - "demo": "projects/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Project name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "description": { - "type": "string", - "description": "Project description. Max length: 256 chars.", - "default": "", - "x-example": "[DESCRIPTION]" - }, - "logo": { - "type": "string", - "description": "Project logo.", - "default": "", - "x-example": "[LOGO]" - }, - "url": { - "type": "string", - "description": "Project URL.", - "default": "", - "x-example": "https://example.com" - }, - "legalName": { - "type": "string", - "description": "Project legal name. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_NAME]" - }, - "legalCountry": { - "type": "string", - "description": "Project legal country. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_COUNTRY]" - }, - "legalState": { - "type": "string", - "description": "Project legal state. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_STATE]" - }, - "legalCity": { - "type": "string", - "description": "Project legal city. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_CITY]" - }, - "legalAddress": { - "type": "string", - "description": "Project legal address. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_ADDRESS]" - }, - "legalTaxId": { - "type": "string", - "description": "Project legal tax ID. Max length: 256 chars.", - "default": "", - "x-example": "[LEGAL_TAX_ID]" - } - }, - "required": ["name"] - } - } - ] - }, - "delete": { - "summary": "Delete Project", - "operationId": "projectsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["projects"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 129, - "cookies": false, - "type": "", - "demo": "projects/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "Your user password for confirmation. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["password"] - } - } - ] - } - }, - "/projects/{projectId}/auth/limit": { - "patch": { - "summary": "Update Project users limit", - "operationId": "projectsUpdateAuthLimit", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { "$ref": "#/definitions/project" } - } - }, - "x-appwrite": { - "method": "updateAuthLimit", - "weight": 127, - "cookies": false, - "type": "", - "demo": "projects/update-auth-limit.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "limit": { - "type": "integer", - "description": "Set the max number of users allowed in this project. Use 0 for unlimited.", - "default": null, - "x-example": 0 - } - }, - "required": ["limit"] - } - } - ] - } - }, - "/projects/{projectId}/auth/{method}": { - "patch": { - "summary": "Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.", - "operationId": "projectsUpdateAuthStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { "$ref": "#/definitions/project" } - } - }, - "x-appwrite": { - "method": "updateAuthStatus", - "weight": 128, - "cookies": false, - "type": "", - "demo": "projects/update-auth-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "method", - "description": "Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone", - "required": true, - "type": "string", - "x-example": "email-password", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "Set the status of this auth method.", - "default": null, - "x-example": false - } - }, - "required": ["status"] - } - } - ] - } - }, - "/projects/{projectId}/domains": { - "get": { - "summary": "List Domains", - "operationId": "projectsListDomains", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Domains List", - "schema": { "$ref": "#/definitions/domainList" } - } - }, - "x-appwrite": { - "method": "listDomains", - "weight": 146, - "cookies": false, - "type": "", - "demo": "projects/list-domains.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - } - ] - }, - "post": { - "summary": "Create Domain", - "operationId": "projectsCreateDomain", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "201": { - "description": "Domain", - "schema": { "$ref": "#/definitions/domain" } - } - }, - "x-appwrite": { - "method": "createDomain", - "weight": 145, - "cookies": false, - "type": "", - "demo": "projects/create-domain.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "domain": { - "type": "string", - "description": "Domain name.", - "default": null, - "x-example": null - } - }, - "required": ["domain"] - } - } - ] - } - }, - "/projects/{projectId}/domains/{domainId}": { - "get": { - "summary": "Get Domain", - "operationId": "projectsGetDomain", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Domain", - "schema": { "$ref": "#/definitions/domain" } - } - }, - "x-appwrite": { - "method": "getDomain", - "weight": 147, - "cookies": false, - "type": "", - "demo": "projects/get-domain.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "type": "string", - "x-example": "[DOMAIN_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Domain", - "operationId": "projectsDeleteDomain", - "consumes": ["application/json"], - "produces": [], - "tags": ["projects"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteDomain", - "weight": 149, - "cookies": false, - "type": "", - "demo": "projects/delete-domain.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "type": "string", - "x-example": "[DOMAIN_ID]", - "in": "path" - } - ] - } - }, - "/projects/{projectId}/domains/{domainId}/verification": { - "patch": { - "summary": "Update Domain Verification Status", - "operationId": "projectsUpdateDomainVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Domain", - "schema": { "$ref": "#/definitions/domain" } - } - }, - "x-appwrite": { - "method": "updateDomainVerification", - "weight": 148, - "cookies": false, - "type": "", - "demo": "projects/update-domain-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "domainId", - "description": "Domain unique ID.", - "required": true, - "type": "string", - "x-example": "[DOMAIN_ID]", - "in": "path" - } - ] - } - }, - "/projects/{projectId}/keys": { - "get": { - "summary": "List Keys", - "operationId": "projectsListKeys", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "API Keys List", - "schema": { "$ref": "#/definitions/keyList" } - } - }, - "x-appwrite": { - "method": "listKeys", - "weight": 136, - "cookies": false, - "type": "", - "demo": "projects/list-keys.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - } - ] - }, - "post": { - "summary": "Create Key", - "operationId": "projectsCreateKey", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "201": { - "description": "Key", - "schema": { "$ref": "#/definitions/key" } - } - }, - "x-appwrite": { - "method": "createKey", - "weight": 135, - "cookies": false, - "type": "", - "demo": "projects/create-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "scopes": { - "type": "array", - "description": "Key scopes list.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["name", "scopes"] - } - } - ] - } - }, - "/projects/{projectId}/keys/{keyId}": { - "get": { - "summary": "Get Key", - "operationId": "projectsGetKey", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Key", - "schema": { "$ref": "#/definitions/key" } - } - }, - "x-appwrite": { - "method": "getKey", - "weight": 137, - "cookies": false, - "type": "", - "demo": "projects/get-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "type": "string", - "x-example": "[KEY_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Key", - "operationId": "projectsUpdateKey", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Key", - "schema": { "$ref": "#/definitions/key" } - } - }, - "x-appwrite": { - "method": "updateKey", - "weight": 138, - "cookies": false, - "type": "", - "demo": "projects/update-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "type": "string", - "x-example": "[KEY_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "scopes": { - "type": "array", - "description": "Key scopes list", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["name", "scopes"] - } - } - ] - }, - "delete": { - "summary": "Delete Key", - "operationId": "projectsDeleteKey", - "consumes": ["application/json"], - "produces": [], - "tags": ["projects"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteKey", - "weight": 139, - "cookies": false, - "type": "", - "demo": "projects/delete-key.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "keyId", - "description": "Key unique ID.", - "required": true, - "type": "string", - "x-example": "[KEY_ID]", - "in": "path" - } - ] - } - }, - "/projects/{projectId}/oauth2": { - "patch": { - "summary": "Update Project OAuth2", - "operationId": "projectsUpdateOAuth2", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { "$ref": "#/definitions/project" } - } - }, - "x-appwrite": { - "method": "updateOAuth2", - "weight": 126, - "cookies": false, - "type": "", - "demo": "projects/update-o-auth2.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "Provider Name", - "default": null, - "x-example": "amazon" - }, - "appId": { - "type": "string", - "description": "Provider app ID. Max length: 256 chars.", - "default": "", - "x-example": "[APP_ID]" - }, - "secret": { - "type": "string", - "description": "Provider secret key. Max length: 512 chars.", - "default": "", - "x-example": "[SECRET]" - } - }, - "required": ["provider"] - } - } - ] - } - }, - "/projects/{projectId}/platforms": { - "get": { - "summary": "List Platforms", - "operationId": "projectsListPlatforms", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Platforms List", - "schema": { "$ref": "#/definitions/platformList" } - } - }, - "x-appwrite": { - "method": "listPlatforms", - "weight": 141, - "cookies": false, - "type": "", - "demo": "projects/list-platforms.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - } - ] - }, - "post": { - "summary": "Create Platform", - "operationId": "projectsCreatePlatform", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "201": { - "description": "Platform", - "schema": { "$ref": "#/definitions/platform" } - } - }, - "x-appwrite": { - "method": "createPlatform", - "weight": 140, - "cookies": false, - "type": "", - "demo": "projects/create-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Platform type.", - "default": null, - "x-example": "web" - }, - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "key": { - "type": "string", - "description": "Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.", - "default": "", - "x-example": "[KEY]" - }, - "store": { - "type": "string", - "description": "App store or Google Play store ID. Max length: 256 chars.", - "default": "", - "x-example": "[STORE]" - }, - "hostname": { - "type": "string", - "description": "Platform client hostname. Max length: 256 chars.", - "default": "", - "x-example": "[HOSTNAME]" - } - }, - "required": ["type", "name"] - } - } - ] - } - }, - "/projects/{projectId}/platforms/{platformId}": { - "get": { - "summary": "Get Platform", - "operationId": "projectsGetPlatform", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Platform", - "schema": { "$ref": "#/definitions/platform" } - } - }, - "x-appwrite": { - "method": "getPlatform", - "weight": 142, - "cookies": false, - "type": "", - "demo": "projects/get-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "platformId", - "description": "Platform unique ID.", - "required": true, - "type": "string", - "x-example": "[PLATFORM_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Platform", - "operationId": "projectsUpdatePlatform", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Platform", - "schema": { "$ref": "#/definitions/platform" } - } - }, - "x-appwrite": { - "method": "updatePlatform", - "weight": 143, - "cookies": false, - "type": "", - "demo": "projects/update-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "platformId", - "description": "Platform unique ID.", - "required": true, - "type": "string", - "x-example": "[PLATFORM_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Platform name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "key": { - "type": "string", - "description": "Package name for android or bundle ID for iOS. Max length: 256 chars.", - "default": "", - "x-example": "[KEY]" - }, - "store": { - "type": "string", - "description": "App store or Google Play store ID. Max length: 256 chars.", - "default": "", - "x-example": "[STORE]" - }, - "hostname": { - "type": "string", - "description": "Platform client URL. Max length: 256 chars.", - "default": "", - "x-example": "[HOSTNAME]" - } - }, - "required": ["name"] - } - } - ] - }, - "delete": { - "summary": "Delete Platform", - "operationId": "projectsDeletePlatform", - "consumes": ["application/json"], - "produces": [], - "tags": ["projects"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deletePlatform", - "weight": 144, - "cookies": false, - "type": "", - "demo": "projects/delete-platform.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "platformId", - "description": "Platform unique ID.", - "required": true, - "type": "string", - "x-example": "[PLATFORM_ID]", - "in": "path" - } - ] - } - }, - "/projects/{projectId}/service": { - "patch": { - "summary": "Update service status", - "operationId": "projectsUpdateServiceStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Project", - "schema": { "$ref": "#/definitions/project" } - } - }, - "x-appwrite": { - "method": "updateServiceStatus", - "weight": 125, - "cookies": false, - "type": "", - "demo": "projects/update-service-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "service": { - "type": "string", - "description": "Service name.", - "default": null, - "x-example": "account" - }, - "status": { - "type": "boolean", - "description": "Service status.", - "default": null, - "x-example": false - } - }, - "required": ["service", "status"] - } - } - ] - } - }, - "/projects/{projectId}/usage": { - "get": { - "summary": "Get usage stats for a project", - "operationId": "projectsGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "UsageProject", - "schema": { "$ref": "#/definitions/usageProject" } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 123, - "cookies": false, - "type": "", - "demo": "projects/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - } - ] - } - }, - "/projects/{projectId}/webhooks": { - "get": { - "summary": "List Webhooks", - "operationId": "projectsListWebhooks", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Webhooks List", - "schema": { "$ref": "#/definitions/webhookList" } - } - }, - "x-appwrite": { - "method": "listWebhooks", - "weight": 131, - "cookies": false, - "type": "", - "demo": "projects/list-webhooks.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - } - ] - }, - "post": { - "summary": "Create Webhook", - "operationId": "projectsCreateWebhook", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "201": { - "description": "Webhook", - "schema": { "$ref": "#/definitions/webhook" } - } - }, - "x-appwrite": { - "method": "createWebhook", - "weight": 130, - "cookies": false, - "type": "", - "demo": "projects/create-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "default": null, - "x-example": "https://example.com" - }, - "security": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": null, - "x-example": false - }, - "httpUser": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "[HTTP_USER]" - }, - "httpPass": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "[HTTP_PASS]" - } - }, - "required": ["name", "events", "url", "security"] - } - } - ] - } - }, - "/projects/{projectId}/webhooks/{webhookId}": { - "get": { - "summary": "Get Webhook", - "operationId": "projectsGetWebhook", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Webhook", - "schema": { "$ref": "#/definitions/webhook" } - } - }, - "x-appwrite": { - "method": "getWebhook", - "weight": 132, - "cookies": false, - "type": "", - "demo": "projects/get-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "webhookId", - "description": "Webhook unique ID.", - "required": true, - "type": "string", - "x-example": "[WEBHOOK_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Webhook", - "operationId": "projectsUpdateWebhook", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["projects"], - "description": "", - "responses": { - "200": { - "description": "Webhook", - "schema": { "$ref": "#/definitions/webhook" } - } - }, - "x-appwrite": { - "method": "updateWebhook", - "weight": 133, - "cookies": false, - "type": "", - "demo": "projects/update-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "webhookId", - "description": "Webhook unique ID.", - "required": true, - "type": "string", - "x-example": "[WEBHOOK_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Webhook name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "Webhook URL.", - "default": null, - "x-example": "https://example.com" - }, - "security": { - "type": "boolean", - "description": "Certificate verification, false for disabled or true for enabled.", - "default": null, - "x-example": false - }, - "httpUser": { - "type": "string", - "description": "Webhook HTTP user. Max length: 256 chars.", - "default": "", - "x-example": "[HTTP_USER]" - }, - "httpPass": { - "type": "string", - "description": "Webhook HTTP password. Max length: 256 chars.", - "default": "", - "x-example": "[HTTP_PASS]" - } - }, - "required": ["name", "events", "url", "security"] - } - } - ] - }, - "delete": { - "summary": "Delete Webhook", - "operationId": "projectsDeleteWebhook", - "consumes": ["application/json"], - "produces": [], - "tags": ["projects"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteWebhook", - "weight": 134, - "cookies": false, - "type": "", - "demo": "projects/delete-webhook.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "projects.write", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "type": "string", - "x-example": "[PROJECT_ID]", - "in": "path" - }, - { - "name": "webhookId", - "description": "Webhook unique ID.", - "required": true, - "type": "string", - "x-example": "[WEBHOOK_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets": { - "get": { - "summary": "List buckets", - "operationId": "storageListBuckets", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Buckets List", - "schema": { "$ref": "#/definitions/bucketList" } - } - }, - "x-appwrite": { - "method": "listBuckets", - "weight": 151, - "cookies": false, - "type": "", - "demo": "storage/list-buckets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-buckets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Results offset. The default value is 0. Use this param to manage pagination.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create bucket", - "operationId": "storageCreateBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Create a new storage bucket.", - "responses": { - "201": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "createBucket", - "weight": 150, - "cookies": false, - "type": "", - "demo": "storage/create-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[BUCKET_ID]" - }, - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "file" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled?", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", - "default": 30000000, - "x-example": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["bucketId", "name", "permission"] - } - } - ] - } - }, - "/storage/buckets/{bucketId}": { - "get": { - "summary": "Get Bucket", - "operationId": "storageGetBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "getBucket", - "weight": 152, - "cookies": false, - "type": "", - "demo": "storage/get-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Bucket", - "operationId": "storageUpdateBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Update a storage bucket by its unique ID.", - "responses": { - "200": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "updateBucket", - "weight": 153, - "cookies": false, - "type": "", - "demo": "storage/update-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "file" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled?", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", - "default": null, - "x-example": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["name", "permission"] - } - } - ] - }, - "delete": { - "summary": "Delete Bucket", - "operationId": "storageDeleteBucket", - "consumes": ["application/json"], - "produces": [], - "tags": ["storage"], - "description": "Delete a storage bucket by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteBucket", - "weight": 154, - "cookies": false, - "type": "", - "demo": "storage/delete-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files": { - "get": { - "summary": "List Files", - "operationId": "storageListFiles", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Files List", - "schema": { "$ref": "#/definitions/fileList" } - } - }, - "x-appwrite": { - "method": "listFiles", - "weight": 156, - "cookies": false, - "type": "", - "demo": "storage/list-files.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create File", - "operationId": "storageCreateFile", - "consumes": ["multipart/form-data"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "createFile", - "weight": 155, - "cookies": false, - "type": "upload", - "demo": "storage/create-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "x-upload-id": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "formData" - }, - { - "name": "file", - "description": "Binary file.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "read", - "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "x-example": "[\"role:all\"]", - "in": "formData" - }, - { - "name": "write", - "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "x-example": "[\"role:all\"]", - "in": "formData" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}": { - "get": { - "summary": "Get File", - "operationId": "storageGetFile", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "getFile", - "weight": 157, - "cookies": false, - "type": "", - "demo": "storage/get-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update File", - "operationId": "storageUpdateFile", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "updateFile", - "weight": 161, - "cookies": false, - "type": "", - "demo": "storage/update-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete File", - "operationId": "storageDeleteFile", - "consumes": ["application/json"], - "produces": [], - "tags": ["storage"], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteFile", - "weight": 162, - "cookies": false, - "type": "", - "demo": "storage/delete-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/download": { - "get": { - "summary": "Get File for Download", - "operationId": "storageGetFileDownload", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["storage"], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { "description": "File", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFileDownload", - "weight": 159, - "cookies": false, - "type": "location", - "demo": "storage/get-file-download.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/preview": { - "get": { - "summary": "Get File Preview", - "operationId": "storageGetFilePreview", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["storage"], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFilePreview", - "weight": 158, - "cookies": false, - "type": "location", - "demo": "storage/get-file-preview.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "type": "string", - "x-example": "center", - "default": "center", - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpg", - "default": "", - "in": "query" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/view": { - "get": { - "summary": "Get File for View", - "operationId": "storageGetFileView", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["storage"], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { "description": "File", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFileView", - "weight": 160, - "cookies": false, - "type": "location", - "demo": "storage/get-file-view.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/storage/usage": { - "get": { - "summary": "Get usage stats for storage", - "operationId": "storageGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "", - "responses": { - "200": { - "description": "StorageUsage", - "schema": { "$ref": "#/definitions/usageStorage" } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 163, - "cookies": false, - "type": "", - "demo": "storage/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - } - ] - } - }, - "/storage/{bucketId}/usage": { - "get": { - "summary": "Get usage stats for a storage bucket", - "operationId": "storageGetBucketUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "", - "responses": { - "200": { - "description": "UsageBuckets", - "schema": { "$ref": "#/definitions/usageBuckets" } - } - }, - "x-appwrite": { - "method": "getBucketUsage", - "weight": 164, - "cookies": false, - "type": "", - "demo": "storage/get-bucket-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket ID.", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - } - ] - } - }, - "/teams": { - "get": { - "summary": "List Teams", - "operationId": "teamsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Teams List", - "schema": { "$ref": "#/definitions/teamList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 166, - "cookies": false, - "type": "", - "demo": "teams/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-teams.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Team", - "operationId": "teamsCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 165, - "cookies": false, - "type": "", - "demo": "teams/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[TEAM_ID]" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", - "default": ["owner"], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["teamId", "name"] - } - } - ] - } - }, - "/teams/{teamId}": { - "get": { - "summary": "Get Team", - "operationId": "teamsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 167, - "cookies": false, - "type": "", - "demo": "teams/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Team", - "operationId": "teamsUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Update a team using its ID. Only members with the owner role can update the team.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "update", - "weight": 168, - "cookies": false, - "type": "", - "demo": "teams/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - }, - "delete": { - "summary": "Delete Team", - "operationId": "teamsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 169, - "cookies": false, - "type": "", - "demo": "teams/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships": { - "get": { - "summary": "Get Team Memberships", - "operationId": "teamsGetMemberships", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMemberships", - "weight": 171, - "cookies": false, - "type": "", - "demo": "teams/get-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-members.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Team Membership", - "operationId": "teamsCreateMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.", - "responses": { - "201": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "createMembership", - "weight": 170, - "cookies": false, - "type": "", - "demo": "teams/create-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "default": null, - "x-example": "email@example.com" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["email", "roles", "url"] - } - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}": { - "get": { - "summary": "Get Team Membership", - "operationId": "teamsGetMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 172, - "cookies": false, - "type": "", - "demo": "teams/get-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-member.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Membership Roles", - "operationId": "teamsUpdateMembershipRoles", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions).", - "responses": { - "200": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "updateMembershipRoles", - "weight": 173, - "cookies": false, - "type": "", - "demo": "teams/update-membership-roles.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-roles.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["roles"] - } - } - ] - }, - "delete": { - "summary": "Delete Team Membership", - "operationId": "teamsDeleteMembership", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteMembership", - "weight": 175, - "cookies": false, - "type": "", - "demo": "teams/delete-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}/status": { - "patch": { - "summary": "Update Team Membership Status", - "operationId": "teamsUpdateMembershipStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "updateMembershipStatus", - "weight": 174, - "cookies": false, - "type": "", - "demo": "teams/update-membership-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/users": { - "get": { - "summary": "List Users", - "operationId": "usersList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Users List", - "schema": { "$ref": "#/definitions/userList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 177, - "cookies": false, - "type": "", - "demo": "users/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-users.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create User", - "operationId": "usersCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user.", - "responses": { - "201": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 176, - "cookies": false, - "type": "", - "demo": "users/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[USER_ID]" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/usage": { - "get": { - "summary": "Get usage stats for the users API", - "operationId": "usersGetUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "", - "responses": { - "200": { - "description": "UsageUsers", - "schema": { "$ref": "#/definitions/usageUsers" } - } - }, - "x-appwrite": { - "method": "getUsage", - "weight": 191, - "cookies": false, - "type": "", - "demo": "users/get-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["console"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [] }], - "parameters": [ - { - "name": "range", - "description": "Date range.", - "required": false, - "type": "string", - "x-example": "24h", - "default": "30d", - "in": "query" - }, - { - "name": "provider", - "description": "Provider Name.", - "required": false, - "type": "string", - "x-example": "email", - "default": "", - "in": "query" - } - ] - } - }, - "/users/{userId}": { - "get": { - "summary": "Get User", - "operationId": "usersGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get a user by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 178, - "cookies": false, - "type": "", - "demo": "users/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete User", - "operationId": "usersDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete a user by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 190, - "cookies": false, - "type": "", - "demo": "users/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - } - }, - "/users/{userId}/email": { - "patch": { - "summary": "Update Email", - "operationId": "usersUpdateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user email by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateEmail", - "weight": 186, - "cookies": false, - "type": "", - "demo": "users/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - } - }, - "required": ["email"] - } - } - ] - } - }, - "/users/{userId}/logs": { - "get": { - "summary": "Get User Logs", - "operationId": "usersGetLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { "$ref": "#/definitions/logList" } - } - }, - "x-appwrite": { - "method": "getLogs", - "weight": 181, - "cookies": false, - "type": "", - "demo": "users/get-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/users/{userId}/name": { - "patch": { - "summary": "Update Name", - "operationId": "usersUpdateName", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user name by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 184, - "cookies": false, - "type": "", - "demo": "users/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - } - }, - "/users/{userId}/password": { - "patch": { - "summary": "Update Password", - "operationId": "usersUpdatePassword", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user password by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 185, - "cookies": false, - "type": "", - "demo": "users/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["password"] - } - } - ] - } - }, - "/users/{userId}/prefs": { - "get": { - "summary": "Get User Preferences", - "operationId": "usersGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "schema": { "$ref": "#/definitions/preferences" } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 179, - "cookies": false, - "type": "", - "demo": "users/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update User Preferences", - "operationId": "usersUpdatePrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { "$ref": "#/definitions/preferences" } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 187, - "cookies": false, - "type": "", - "demo": "users/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - ] - } - }, - "/users/{userId}/sessions": { - "get": { - "summary": "Get User Sessions", - "operationId": "usersGetSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user sessions list by its unique ID.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { "$ref": "#/definitions/sessionList" } - } - }, - "x-appwrite": { - "method": "getSessions", - "weight": 180, - "cookies": false, - "type": "", - "demo": "users/get-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete User Sessions", - "operationId": "usersDeleteSessions", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete all user's sessions by using the user's unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSessions", - "weight": 189, - "cookies": false, - "type": "", - "demo": "users/delete-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - } - }, - "/users/{userId}/sessions/{sessionId}": { - "delete": { - "summary": "Delete User Session", - "operationId": "usersDeleteSession", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete a user sessions by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSession", - "weight": 188, - "cookies": false, - "type": "", - "demo": "users/delete-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "sessionId", - "description": "Session ID.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - } - }, - "/users/{userId}/status": { - "patch": { - "summary": "Update User Status", - "operationId": "usersUpdateStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateStatus", - "weight": 182, - "cookies": false, - "type": "", - "demo": "users/update-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", - "default": null, - "x-example": false - } - }, - "required": ["status"] - } - } - ] - } - }, - "/users/{userId}/verification": { - "patch": { - "summary": "Update Email Verification", - "operationId": "usersUpdateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateVerification", - "weight": 183, - "cookies": false, - "type": "", - "demo": "users/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "default": null, - "x-example": false - } - }, - "required": ["emailVerification"] - } - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "database", - "description": "The Database service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - } - ], - "definitions": { - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { "type": "object", "$ref": "#/definitions/document" }, - "x-example": "" - } - }, - "required": ["total", "documents"] - }, - "collectionList": { - "description": "Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { "type": "object", "$ref": "#/definitions/collection" }, - "x-example": "" - } - }, - "required": ["total", "collections"] - }, - "indexList": { - "description": "Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { "type": "object", "$ref": "#/definitions/index" }, - "x-example": "" - } - }, - "required": ["total", "indexes"] - }, - "userList": { - "description": "Users List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of users documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "users": { - "type": "array", - "description": "List of users.", - "items": { "type": "object", "$ref": "#/definitions/user" }, - "x-example": "" - } - }, - "required": ["total", "users"] - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { "type": "object", "$ref": "#/definitions/session" }, - "x-example": "" - } - }, - "required": ["total", "sessions"] - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { "type": "object", "$ref": "#/definitions/log" }, - "x-example": "" - } - }, - "required": ["total", "logs"] - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { "type": "object", "$ref": "#/definitions/file" }, - "x-example": "" - } - }, - "required": ["total", "files"] - }, - "bucketList": { - "description": "Buckets List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of buckets documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "List of buckets.", - "items": { "type": "object", "$ref": "#/definitions/bucket" }, - "x-example": "" - } - }, - "required": ["total", "buckets"] - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { "type": "object", "$ref": "#/definitions/team" }, - "x-example": "" - } - }, - "required": ["total", "teams"] - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { "type": "object", "$ref": "#/definitions/membership" }, - "x-example": "" - } - }, - "required": ["total", "memberships"] - }, - "functionList": { - "description": "Functions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of functions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "List of functions.", - "items": { "type": "object", "$ref": "#/definitions/function" }, - "x-example": "" - } - }, - "required": ["total", "functions"] - }, - "runtimeList": { - "description": "Runtimes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimes documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes.", - "items": { "type": "object", "$ref": "#/definitions/runtime" }, - "x-example": "" - } - }, - "required": ["total", "runtimes"] - }, - "deploymentList": { - "description": "Deployments List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of deployments documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "List of deployments.", - "items": { "type": "object", "$ref": "#/definitions/deployment" }, - "x-example": "" - } - }, - "required": ["total", "deployments"] - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { "type": "object", "$ref": "#/definitions/execution" }, - "x-example": "" - } - }, - "required": ["total", "executions"] - }, - "projectList": { - "description": "Projects List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of projects documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "projects": { - "type": "array", - "description": "List of projects.", - "items": { "type": "object", "$ref": "#/definitions/project" }, - "x-example": "" - } - }, - "required": ["total", "projects"] - }, - "webhookList": { - "description": "Webhooks List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of webhooks documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "webhooks": { - "type": "array", - "description": "List of webhooks.", - "items": { "type": "object", "$ref": "#/definitions/webhook" }, - "x-example": "" - } - }, - "required": ["total", "webhooks"] - }, - "keyList": { - "description": "API Keys List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of keys documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "keys": { - "type": "array", - "description": "List of keys.", - "items": { "type": "object", "$ref": "#/definitions/key" }, - "x-example": "" - } - }, - "required": ["total", "keys"] - }, - "platformList": { - "description": "Platforms List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of platforms documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "platforms": { - "type": "array", - "description": "List of platforms.", - "items": { "type": "object", "$ref": "#/definitions/platform" }, - "x-example": "" - } - }, - "required": ["total", "platforms"] - }, - "domainList": { - "description": "Domains List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of domains documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "domains": { - "type": "array", - "description": "List of domains.", - "items": { "type": "object", "$ref": "#/definitions/domain" }, - "x-example": "" - } - }, - "required": ["total", "domains"] - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { "type": "object", "$ref": "#/definitions/country" }, - "x-example": "" - } - }, - "required": ["total", "countries"] - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { "type": "object", "$ref": "#/definitions/continent" }, - "x-example": "" - } - }, - "required": ["total", "continents"] - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { "type": "object", "$ref": "#/definitions/language" }, - "x-example": "" - } - }, - "required": ["total", "languages"] - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { "type": "object", "$ref": "#/definitions/currency" }, - "x-example": "" - } - }, - "required": ["total", "currencies"] - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { "type": "object", "$ref": "#/definitions/phone" }, - "x-example": "" - } - }, - "required": ["total", "phones"] - }, - "metricList": { - "description": "Metric List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of metrics documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "metrics": { - "type": "array", - "description": "List of metrics.", - "items": { "type": "object", "$ref": "#/definitions/metric" }, - "x-example": "" - } - }, - "required": ["total", "metrics"] - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Collection read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "Collection write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled.", - "x-example": false - }, - "permission": { - "type": "string", - "description": "Collection permission model. Possible values: `document` or `collection`", - "x-example": "document" - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "x-anyOf": [ - { "$ref": "#/definitions/attributeBoolean" }, - { "$ref": "#/definitions/attributeInteger" }, - { "$ref": "#/definitions/attributeFloat" }, - { "$ref": "#/definitions/attributeEmail" }, - { "$ref": "#/definitions/attributeEnum" }, - { "$ref": "#/definitions/attributeUrl" }, - { "$ref": "#/definitions/attributeIp" }, - { "$ref": "#/definitions/attributeString" } - ] - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { "type": "object", "$ref": "#/definitions/index" }, - "x-example": {} - } - }, - "required": [ - "$id", - "$read", - "$write", - "name", - "enabled", - "permission", - "attributes", - "indexes" - ] - }, - "attributeList": { - "description": "Attributes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of attributes in the given collection.", - "x-example": 5, - "format": "int32" - }, - "attributes": { - "type": "array", - "description": "List of attributes.", - "items": { - "x-anyOf": [ - { "$ref": "#/definitions/attributeBoolean" }, - { "$ref": "#/definitions/attributeInteger" }, - { "$ref": "#/definitions/attributeFloat" }, - { "$ref": "#/definitions/attributeEmail" }, - { "$ref": "#/definitions/attributeEnum" }, - { "$ref": "#/definitions/attributeUrl" }, - { "$ref": "#/definitions/attributeIp" }, - { "$ref": "#/definitions/attributeString" } - ] - }, - "x-example": "" - } - }, - "required": ["total", "attributes"] - }, - "attributeString": { - "description": "AttributeString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "size"] - }, - "attributeInteger": { - "description": "AttributeInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int32", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 10, - "format": "int32", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required"] - }, - "attributeFloat": { - "description": "AttributeFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 2.5, - "format": "double", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required"] - }, - "attributeBoolean": { - "description": "AttributeBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required"] - }, - "attributeEmail": { - "description": "AttributeEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default@example.com", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "format"] - }, - "attributeEnum": { - "description": "AttributeEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { "type": "string" }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "element", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "elements", "format"] - }, - "attributeIp": { - "description": "AttributeIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "192.0.2.0", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "format"] - }, - "attributeUrl": { - "description": "AttributeURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "http://example.com", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "format"] - }, - "index": { - "description": "Index", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { "type": "string" }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { "type": "string" }, - "x-example": [] - } - }, - "required": ["key", "type", "status", "attributes", "orders"] - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$collection": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e" - }, - "$read": { - "type": "array", - "description": "Document read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "Document write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - } - }, - "additionalProperties": true, - "required": ["$id", "$collection", "$read", "$write"] - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User Email.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "integer", - "description": "Log creation time in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ] - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "registration": { - "type": "integer", - "description": "User registration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "passwordUpdate": { - "type": "integer", - "description": "Unix timestamp of the most recent password update", - "x-example": 1592981250, - "format": "int32" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { "theme": "pink", "timezone": "UTC" }, - "items": { "type": "object", "$ref": "#/definitions/preferences" } - } - }, - "required": [ - "$id", - "name", - "registration", - "status", - "passwordUpdate", - "email", - "emailVerification", - "prefs" - ] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "integer", - "description": "Session expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "integer", - "description": "Date, the Unix timestamp of when the access token expires.", - "x-example": 1592981250, - "format": "int32" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - } - }, - "required": [ - "$id", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "integer", - "description": "Token expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - } - }, - "required": ["$id", "userId", "secret", "expire"] - }, - "jwt": { - "description": "JWT", - "type": "object", - "properties": { - "jwt": { - "type": "string", - "description": "JWT encoded string.", - "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" - } - }, - "required": ["jwt"] - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the Europian Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ] - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "dateCreated": { - "type": "integer", - "description": "File creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$read", - "$write", - "name", - "dateCreated", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": ["role:all"] - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": ["user:608f9da25e7e1"] - }, - "permission": { - "type": "string", - "description": "Bucket permission model. Possible values: `bucket` or `file`", - "x-example": "file" - }, - "dateCreated": { - "type": "integer", - "description": "Bucket creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Bucket update date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { "type": "string" }, - "x-example": ["jpg", "png"] - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - } - }, - "required": [ - "$id", - "$read", - "$write", - "permission", - "dateCreated", - "dateUpdated", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "encryption", - "antivirus" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "dateCreated": { - "type": "integer", - "description": "Team creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - } - }, - "required": ["$id", "name", "dateCreated", "total"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "VIP" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "invited": { - "type": "integer", - "description": "Date, the user has been invited to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "joined": { - "type": "integer", - "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { "type": "string" }, - "x-example": "admin" - } - }, - "required": [ - "$id", - "userId", - "teamId", - "name", - "email", - "invited", - "joined", - "confirm", - "roles" - ] - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { "type": "string" }, - "x-example": "role:member" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "dateCreated": { - "type": "integer", - "description": "Function creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Function update date in Unix timestamp.", - "x-example": 1592981257, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Function status. Possible values: `disabled`, `enabled`", - "x-example": "enabled" - }, - "runtime": { - "type": "string", - "description": "Function execution runtime.", - "x-example": "python-3.8" - }, - "deployment": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "vars": { - "type": "object", - "additionalProperties": true, - "description": "Function environment variables.", - "x-example": { "key": "value" } - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { "type": "string" }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedult in CRON format.", - "x-example": "5 4 * * *" - }, - "scheduleNext": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981292, - "format": "int32" - }, - "schedulePrevious": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981237, - "format": "int32" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 1592981237, - "format": "int32" - } - }, - "required": [ - "$id", - "execute", - "name", - "dateCreated", - "dateUpdated", - "status", - "runtime", - "deployment", - "vars", - "events", - "schedule", - "scheduleNext", - "schedulePrevious", - "timeout" - ] - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { "type": "string" }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "name", - "version", - "base", - "image", - "logo", - "supports" - ] - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "dateCreated": { - "type": "integer", - "description": "The deployment creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "enabled" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "status": { - "type": "string", - "description": "The deployment status.", - "x-example": "enabled" - }, - "buildStdout": { - "type": "string", - "description": "The build stdout.", - "x-example": "enabled" - }, - "buildStderr": { - "type": "string", - "description": "The build stderr.", - "x-example": "enabled" - } - }, - "required": [ - "$id", - "resourceId", - "resourceType", - "dateCreated", - "entrypoint", - "size", - "buildId", - "activate", - "status", - "buildStdout", - "buildStderr" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Execution read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "dateCreated": { - "type": "integer", - "description": "The execution creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "statusCode": { - "type": "integer", - "description": "The script status code.", - "x-example": 0, - "format": "int32" - }, - "stdout": { - "type": "string", - "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", - "x-example": "" - }, - "time": { - "type": "number", - "description": "The script execution time in seconds.", - "x-example": 0.4, - "format": "double" - } - }, - "required": [ - "$id", - "$read", - "functionId", - "dateCreated", - "trigger", - "status", - "statusCode", - "stdout", - "stderr", - "time" - ] - }, - "project": { - "description": "Project", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Project ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Project name.", - "x-example": "New Project" - }, - "description": { - "type": "string", - "description": "Project description.", - "x-example": "This is a new project." - }, - "teamId": { - "type": "string", - "description": "Project team ID.", - "x-example": "1592981250" - }, - "logo": { - "type": "string", - "description": "Project logo file ID.", - "x-example": "5f5c451b403cb" - }, - "url": { - "type": "string", - "description": "Project website URL.", - "x-example": "5f5c451b403cb" - }, - "legalName": { - "type": "string", - "description": "Company legal name.", - "x-example": "Company LTD." - }, - "legalCountry": { - "type": "string", - "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format.", - "x-example": "US" - }, - "legalState": { - "type": "string", - "description": "State name.", - "x-example": "New York" - }, - "legalCity": { - "type": "string", - "description": "City name.", - "x-example": "New York City." - }, - "legalAddress": { - "type": "string", - "description": "Company Address.", - "x-example": "620 Eighth Avenue, New York, NY 10018" - }, - "legalTaxId": { - "type": "string", - "description": "Company Tax ID.", - "x-example": "131102020" - }, - "authLimit": { - "type": "integer", - "description": "Max users allowed. 0 is unlimited.", - "x-example": 100, - "format": "int32" - }, - "platforms": { - "type": "array", - "description": "List of Platforms.", - "items": { "type": "object", "$ref": "#/definitions/platform" }, - "x-example": {} - }, - "webhooks": { - "type": "array", - "description": "List of Webhooks.", - "items": { "type": "object", "$ref": "#/definitions/webhook" }, - "x-example": {} - }, - "keys": { - "type": "array", - "description": "List of API Keys.", - "items": { "type": "object", "$ref": "#/definitions/key" }, - "x-example": {} - }, - "domains": { - "type": "array", - "description": "List of Domains.", - "items": { "type": "object", "$ref": "#/definitions/domain" }, - "x-example": {} - }, - "providerAmazonAppid": { - "type": "string", - "description": "Amazon OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerAmazonSecret": { - "type": "string", - "description": "Amazon OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerAppleAppid": { - "type": "string", - "description": "Apple OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerAppleSecret": { - "type": "string", - "description": "Apple OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerBitbucketAppid": { - "type": "string", - "description": "BitBucket OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerBitbucketSecret": { - "type": "string", - "description": "BitBucket OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerBitlyAppid": { - "type": "string", - "description": "Bitly OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerBitlySecret": { - "type": "string", - "description": "Bitly OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerBoxAppid": { - "type": "string", - "description": "Box OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerBoxSecret": { - "type": "string", - "description": "Box OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerDiscordAppid": { - "type": "string", - "description": "Discord OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerDiscordSecret": { - "type": "string", - "description": "Discord OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerDropboxAppid": { - "type": "string", - "description": "Dropbox OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerDropboxSecret": { - "type": "string", - "description": "Dropbox OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerFacebookAppid": { - "type": "string", - "description": "Facebook OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerFacebookSecret": { - "type": "string", - "description": "Facebook OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerGithubAppid": { - "type": "string", - "description": "GitHub OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerGithubSecret": { - "type": "string", - "description": "GitHub OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerGitlabAppid": { - "type": "string", - "description": "GitLab OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerGitlabSecret": { - "type": "string", - "description": "GitLab OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerGoogleAppid": { - "type": "string", - "description": "Google OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerGoogleSecret": { - "type": "string", - "description": "Google OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerLinkedinAppid": { - "type": "string", - "description": "LinkedIn OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerLinkedinSecret": { - "type": "string", - "description": "LinkedIn OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerMicrosoftAppid": { - "type": "string", - "description": "Microsoft OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerMicrosoftSecret": { - "type": "string", - "description": "Microsoft OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerNotionAppid": { - "type": "string", - "description": "Notion OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerNotionSecret": { - "type": "string", - "description": "Notion OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerPaypalAppid": { - "type": "string", - "description": "PayPal OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerPaypalSecret": { - "type": "string", - "description": "PayPal OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerPaypalSandboxAppid": { - "type": "string", - "description": "PayPal OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerPaypalSandboxSecret": { - "type": "string", - "description": "PayPal OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerSalesforceAppid": { - "type": "string", - "description": "Salesforce OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerSalesforceSecret": { - "type": "string", - "description": "Salesforce OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerSlackAppid": { - "type": "string", - "description": "Slack OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerSlackSecret": { - "type": "string", - "description": "Slack OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerSpotifyAppid": { - "type": "string", - "description": "Spotify OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerSpotifySecret": { - "type": "string", - "description": "Spotify OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerTradeshiftAppid": { - "type": "string", - "description": "Tradeshift OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerTradeshiftSecret": { - "type": "string", - "description": "Tradeshift OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerTradeshiftBoxAppid": { - "type": "string", - "description": "Tradeshift OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerTradeshiftBoxSecret": { - "type": "string", - "description": "Tradeshift OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerTwitchAppid": { - "type": "string", - "description": "Twitch OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerTwitchSecret": { - "type": "string", - "description": "Twitch OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerVkAppid": { - "type": "string", - "description": "VK OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerVkSecret": { - "type": "string", - "description": "VK OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerYahooAppid": { - "type": "string", - "description": "Yahoo OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerYahooSecret": { - "type": "string", - "description": "Yahoo OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerYammerAppid": { - "type": "string", - "description": "Yammer OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerYammerSecret": { - "type": "string", - "description": "Yammer OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerYandexAppid": { - "type": "string", - "description": "Yandex OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerYandexSecret": { - "type": "string", - "description": "Yandex OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerWordpressAppid": { - "type": "string", - "description": "WordPress OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerWordpressSecret": { - "type": "string", - "description": "WordPress OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerStripeAppid": { - "type": "string", - "description": "Stripe OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerStripeSecret": { - "type": "string", - "description": "Stripe OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "providerMockAppid": { - "type": "string", - "description": "Mock OAuth app ID.", - "x-example": "123247283472834787438" - }, - "providerMockSecret": { - "type": "string", - "description": "Mock OAuth secret ID.", - "x-example": "djsgudsdsewe43434343dd34..." - }, - "authEmailPassword": { - "type": "boolean", - "description": "Email/Password auth method status", - "x-example": true - }, - "authUsersAuthMagicURL": { - "type": "boolean", - "description": "Magic URL auth method status", - "x-example": true - }, - "authAnonymous": { - "type": "boolean", - "description": "Anonymous auth method status", - "x-example": true - }, - "authInvites": { - "type": "boolean", - "description": "Invites auth method status", - "x-example": true - }, - "authJWT": { - "type": "boolean", - "description": "JWT auth method status", - "x-example": true - }, - "authPhone": { - "type": "boolean", - "description": "Phone auth method status", - "x-example": true - }, - "serviceStatusForAccount": { - "type": "boolean", - "description": "Account service status", - "x-example": true - }, - "serviceStatusForAvatars": { - "type": "boolean", - "description": "Avatars service status", - "x-example": true - }, - "serviceStatusForDatabase": { - "type": "boolean", - "description": "Database service status", - "x-example": true - }, - "serviceStatusForLocale": { - "type": "boolean", - "description": "Locale service status", - "x-example": true - }, - "serviceStatusForHealth": { - "type": "boolean", - "description": "Health service status", - "x-example": true - }, - "serviceStatusForStorage": { - "type": "boolean", - "description": "Storage service status", - "x-example": true - }, - "serviceStatusForTeams": { - "type": "boolean", - "description": "Teams service status", - "x-example": true - }, - "serviceStatusForUsers": { - "type": "boolean", - "description": "Users service status", - "x-example": true - }, - "serviceStatusForFunctions": { - "type": "boolean", - "description": "Functions service status", - "x-example": true - } - }, - "required": [ - "$id", - "name", - "description", - "teamId", - "logo", - "url", - "legalName", - "legalCountry", - "legalState", - "legalCity", - "legalAddress", - "legalTaxId", - "authLimit", - "platforms", - "webhooks", - "keys", - "domains", - "providerAmazonAppid", - "providerAmazonSecret", - "providerAppleAppid", - "providerAppleSecret", - "providerBitbucketAppid", - "providerBitbucketSecret", - "providerBitlyAppid", - "providerBitlySecret", - "providerBoxAppid", - "providerBoxSecret", - "providerDiscordAppid", - "providerDiscordSecret", - "providerDropboxAppid", - "providerDropboxSecret", - "providerFacebookAppid", - "providerFacebookSecret", - "providerGithubAppid", - "providerGithubSecret", - "providerGitlabAppid", - "providerGitlabSecret", - "providerGoogleAppid", - "providerGoogleSecret", - "providerLinkedinAppid", - "providerLinkedinSecret", - "providerMicrosoftAppid", - "providerMicrosoftSecret", - "providerNotionAppid", - "providerNotionSecret", - "providerPaypalAppid", - "providerPaypalSecret", - "providerPaypalSandboxAppid", - "providerPaypalSandboxSecret", - "providerSalesforceAppid", - "providerSalesforceSecret", - "providerSlackAppid", - "providerSlackSecret", - "providerSpotifyAppid", - "providerSpotifySecret", - "providerTradeshiftAppid", - "providerTradeshiftSecret", - "providerTradeshiftBoxAppid", - "providerTradeshiftBoxSecret", - "providerTwitchAppid", - "providerTwitchSecret", - "providerVkAppid", - "providerVkSecret", - "providerYahooAppid", - "providerYahooSecret", - "providerYammerAppid", - "providerYammerSecret", - "providerYandexAppid", - "providerYandexSecret", - "providerWordpressAppid", - "providerWordpressSecret", - "providerStripeAppid", - "providerStripeSecret", - "providerMockAppid", - "providerMockSecret", - "authEmailPassword", - "authUsersAuthMagicURL", - "authAnonymous", - "authInvites", - "authJWT", - "authPhone", - "serviceStatusForAccount", - "serviceStatusForAvatars", - "serviceStatusForDatabase", - "serviceStatusForLocale", - "serviceStatusForHealth", - "serviceStatusForStorage", - "serviceStatusForTeams", - "serviceStatusForUsers", - "serviceStatusForFunctions" - ] - }, - "webhook": { - "description": "Webhook", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Webhook ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Webhook name.", - "x-example": "My Webhook" - }, - "url": { - "type": "string", - "description": "Webhook URL endpoint.", - "x-example": "https://example.com/webhook" - }, - "events": { - "type": "array", - "description": "Webhook trigger events.", - "items": { "type": "string" }, - "x-example": "database.collections.update" - }, - "security": { - "type": "boolean", - "description": "Indicated if SSL / TLS Certificate verification is enabled.", - "x-example": true - }, - "httpUser": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "httpPass": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - } - }, - "required": [ - "$id", - "name", - "url", - "events", - "security", - "httpUser", - "httpPass" - ] - }, - "key": { - "description": "Key", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Key ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Key name.", - "x-example": "My API Key" - }, - "scopes": { - "type": "array", - "description": "Allowed permission scopes.", - "items": { "type": "string" }, - "x-example": "users.read" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "x-example": "919c2d18fb5d4...a2ae413da83346ad2" - } - }, - "required": ["$id", "name", "scopes", "secret"] - }, - "domain": { - "description": "Domain", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Domain ID.", - "x-example": "5e5ea5c16897e" - }, - "domain": { - "type": "string", - "description": "Domain name.", - "x-example": "appwrite.company.com" - }, - "registerable": { - "type": "string", - "description": "Registerable domain name.", - "x-example": "company.com" - }, - "tld": { - "type": "string", - "description": "TLD name.", - "x-example": "com" - }, - "verification": { - "type": "boolean", - "description": "Verification process status.", - "x-example": true - }, - "certificateId": { - "type": "string", - "description": "Certificate ID.", - "x-example": "6ejea5c13377e" - } - }, - "required": [ - "$id", - "domain", - "registerable", - "tld", - "verification", - "certificateId" - ] - }, - "platform": { - "description": "Platform", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Platform ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Platform name.", - "x-example": "My Web App" - }, - "type": { - "type": "string", - "description": "Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "My Web App" - }, - "key": { - "type": "string", - "description": "Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.", - "x-example": "com.company.appname" - }, - "store": { - "type": "string", - "description": "App store or Google Play store ID.", - "x-example": "" - }, - "hostname": { - "type": "string", - "description": "Web app hostname. Empty string for other platforms.", - "x-example": true - }, - "httpUser": { - "type": "string", - "description": "HTTP basic authentication username.", - "x-example": "username" - }, - "httpPass": { - "type": "string", - "description": "HTTP basic authentication password.", - "x-example": "password" - } - }, - "required": [ - "$id", - "name", - "type", - "key", - "store", - "hostname", - "httpUser", - "httpPass" - ] - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": ["name", "code"] - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": ["name", "code"] - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": ["name", "code", "nativeName"] - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ] - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": ["code", "countryCode", "countryName"] - }, - "healthAntivirus": { - "description": "Health Antivirus", - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" - }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" - } - }, - "required": ["version", "status"] - }, - "healthQueue": { - "description": "Health Queue", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" - } - }, - "required": ["size"] - }, - "healthStatus": { - "description": "Health Status", - "type": "object", - "properties": { - "ping": { - "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" - } - }, - "required": ["ping", "status"] - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { - "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, - "format": "int32" - }, - "localTime": { - "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, - "format": "int32" - }, - "diff": { - "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, - "format": "int32" - } - }, - "required": ["remoteTime", "localTime", "diff"] - }, - "usageDatabase": { - "description": "UsageDatabase", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "documentsCount": { - "type": "array", - "description": "Aggregated stats for total number of documents.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "collectionsCount": { - "type": "array", - "description": "Aggregated stats for total number of collections.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsCreate": { - "type": "array", - "description": "Aggregated stats for documents created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsRead": { - "type": "array", - "description": "Aggregated stats for documents read.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsUpdate": { - "type": "array", - "description": "Aggregated stats for documents updated.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsDelete": { - "type": "array", - "description": "Aggregated stats for documents deleted.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "collectionsCreate": { - "type": "array", - "description": "Aggregated stats for collections created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "collectionsRead": { - "type": "array", - "description": "Aggregated stats for collections read.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "collectionsUpdate": { - "type": "array", - "description": "Aggregated stats for collections updated.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "collectionsDelete": { - "type": "array", - "description": "Aggregated stats for collections delete.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - } - }, - "required": [ - "range", - "documentsCount", - "collectionsCount", - "documentsCreate", - "documentsRead", - "documentsUpdate", - "documentsDelete", - "collectionsCreate", - "collectionsRead", - "collectionsUpdate", - "collectionsDelete" - ] - }, - "usageCollection": { - "description": "UsageCollection", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "documentsCount": { - "type": "array", - "description": "Aggregated stats for total number of documents.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsCreate": { - "type": "array", - "description": "Aggregated stats for documents created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsRead": { - "type": "array", - "description": "Aggregated stats for documents read.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsUpdate": { - "type": "array", - "description": "Aggregated stats for documents updated.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documentsDelete": { - "type": "array", - "description": "Aggregated stats for documents deleted.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - } - }, - "required": [ - "range", - "documentsCount", - "documentsCreate", - "documentsRead", - "documentsUpdate", - "documentsDelete" - ] - }, - "usageUsers": { - "description": "UsageUsers", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "usersCount": { - "type": "array", - "description": "Aggregated stats for total number of users.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "usersCreate": { - "type": "array", - "description": "Aggregated stats for users created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "usersRead": { - "type": "array", - "description": "Aggregated stats for users read.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "usersUpdate": { - "type": "array", - "description": "Aggregated stats for users updated.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "usersDelete": { - "type": "array", - "description": "Aggregated stats for users deleted.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "sessionsCreate": { - "type": "array", - "description": "Aggregated stats for sessions created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "sessionsProviderCreate": { - "type": "array", - "description": "Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "sessionsDelete": { - "type": "array", - "description": "Aggregated stats for sessions deleted.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - } - }, - "required": [ - "range", - "usersCount", - "usersCreate", - "usersRead", - "usersUpdate", - "usersDelete", - "sessionsCreate", - "sessionsProviderCreate", - "sessionsDelete" - ] - }, - "usageStorage": { - "description": "StorageUsage", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "filesStorage": { - "type": "array", - "description": "Aggregated stats for the occupied storage size by files (in bytes).", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "tagsStorage": { - "type": "array", - "description": "Aggregated stats for the occupied storage size by tags (in bytes).", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesCount": { - "type": "array", - "description": "Aggregated stats for total number of files.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "bucketsCount": { - "type": "array", - "description": "Aggregated stats for total number of buckets.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "bucketsCreate": { - "type": "array", - "description": "Aggregated stats for buckets created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "bucketsRead": { - "type": "array", - "description": "Aggregated stats for buckets read.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "bucketsUpdate": { - "type": "array", - "description": "Aggregated stats for buckets updated.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "bucketsDelete": { - "type": "array", - "description": "Aggregated stats for buckets deleted.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesCreate": { - "type": "array", - "description": "Aggregated stats for files created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesRead": { - "type": "array", - "description": "Aggregated stats for files read.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesUpdate": { - "type": "array", - "description": "Aggregated stats for files updated.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesDelete": { - "type": "array", - "description": "Aggregated stats for files deleted.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - } - }, - "required": [ - "range", - "filesStorage", - "tagsStorage", - "filesCount", - "bucketsCount", - "bucketsCreate", - "bucketsRead", - "bucketsUpdate", - "bucketsDelete", - "filesCreate", - "filesRead", - "filesUpdate", - "filesDelete" - ] - }, - "usageBuckets": { - "description": "UsageBuckets", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "filesCount": { - "type": "array", - "description": "Aggregated stats for total number of files in this bucket.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesStorage": { - "type": "array", - "description": "Aggregated stats for total storage of files in this bucket.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesCreate": { - "type": "array", - "description": "Aggregated stats for files created.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesRead": { - "type": "array", - "description": "Aggregated stats for files read.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesUpdate": { - "type": "array", - "description": "Aggregated stats for files updated.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "filesDelete": { - "type": "array", - "description": "Aggregated stats for files deleted.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - } - }, - "required": [ - "range", - "filesCount", - "filesStorage", - "filesCreate", - "filesRead", - "filesUpdate", - "filesDelete" - ] - }, - "usageFunctions": { - "description": "UsageFunctions", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "functionsExecutions": { - "type": "array", - "description": "Aggregated stats for function executions.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "functionsFailures": { - "type": "array", - "description": "Aggregated stats for function execution failures.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "functionsCompute": { - "type": "array", - "description": "Aggregated stats for function execution duration.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - } - }, - "required": [ - "range", - "functionsExecutions", - "functionsFailures", - "functionsCompute" - ] - }, - "usageProject": { - "description": "UsageProject", - "type": "object", - "properties": { - "range": { - "type": "string", - "description": "The time range of the usage stats.", - "x-example": "30d" - }, - "requests": { - "type": "array", - "description": "Aggregated stats for number of requests.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "network": { - "type": "array", - "description": "Aggregated stats for consumed bandwidth.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "functions": { - "type": "array", - "description": "Aggregated stats for function executions.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "documents": { - "type": "array", - "description": "Aggregated stats for number of documents.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "collections": { - "type": "array", - "description": "Aggregated stats for number of collections.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "users": { - "type": "array", - "description": "Aggregated stats for number of users.", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - }, - "storage": { - "type": "array", - "description": "Aggregated stats for the occupied storage size (in bytes).", - "items": { "type": "object", "$ref": "#/definitions/metricList" }, - "x-example": {} - } - }, - "required": [ - "range", - "requests", - "network", - "functions", - "documents", - "collections", - "users", - "storage" - ] - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https://appwrite.io/docs" - } -} +{"swagger":"2.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}]}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","default":null,"x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","default":null,"x-example":1},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listDocumentLogs","weight":97,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listCollectionLogs","weight":76,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getUsage","weight":74,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":75,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","default":15,"x-example":1}},"required":["name","execute"]}}]},"delete":{"summary":"Delete Function","operationId":"functionsDelete","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":196,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":121,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":120,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"projectId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","default":null,"x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":124,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":129,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","default":null,"x-example":0}},"required":["limit"]}}]}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","default":null,"x-example":false}},"required":["status"]}}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":146,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":145,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":147,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":149,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":148,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":136,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":135,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}]}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":137,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":138,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list","default":null,"x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}]},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":139,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","default":null,"x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","default":"","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":"","x-example":"[SECRET]"}},"required":["provider"]}}]}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":141,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":140,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","default":null,"x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","default":"","x-example":"[HOSTNAME]"}},"required":["type","name"]}}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":142,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":143,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":"[HOSTNAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":144,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","default":null,"x-example":"account"},"status":{"type":"boolean","description":"Service status.","default":null,"x-example":false}},"required":["service","status"]}}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":123,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":131,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":130,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":132,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":133,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":134,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":30000000,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["bucketId","name","permission"]}}]}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":null,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","required":true,"x-upload-id":true,"type":"string","x-example":"[FILE_ID]","in":"formData"},{"name":"file","description":"Binary file.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":164,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":["owner"],"x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["email","roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":191,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"definitions":{"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerVkAppid":{"type":"string","description":"VK OAuth app ID.","x-example":"123247283472834787438"},"providerVkSecret":{"type":"string","description":"VK OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerVkAppid","providerVkSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","type","key","store","hostname","httpUser","httpPass"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 0e6dd1c5d8..f689255c56 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1,9048 +1 @@ -{ - "swagger": "2.0", - "info": { - "version": "0.13.0", - "title": "Appwrite", - "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "termsOfService": "https://appwrite.io/policy/terms", - "contact": { - "name": "Appwrite Team", - "url": "https://appwrite.io/support", - "email": "team@appwrite.io" - }, - "license": { - "name": "BSD-3-Clause", - "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" - } - }, - "host": "HOSTNAME", - "basePath": "/v1", - "schemes": ["https"], - "consumes": ["application/json", "multipart/form-data"], - "produces": ["application/json"], - "securityDefinitions": { - "Project": { - "type": "apiKey", - "name": "X-Appwrite-Project", - "description": "Your project ID", - "in": "header", - "x-appwrite": { "demo": "5df5acd0d48c2" } - }, - "Key": { - "type": "apiKey", - "name": "X-Appwrite-Key", - "description": "Your secret API key", - "in": "header", - "x-appwrite": { "demo": "919c2d18fb5d4...a2ae413da83346ad2" } - }, - "JWT": { - "type": "apiKey", - "name": "X-Appwrite-JWT", - "description": "Your secret JSON Web Token", - "in": "header", - "x-appwrite": { "demo": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..." } - }, - "Locale": { - "type": "apiKey", - "name": "X-Appwrite-Locale", - "description": "", - "in": "header", - "x-appwrite": { "demo": "en" } - } - }, - "paths": { - "/account": { - "get": { - "summary": "Get Account", - "operationId": "accountGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user data as JSON object.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 47, - "cookies": false, - "type": "", - "demo": "account/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "delete": { - "summary": "Delete Account", - "operationId": "accountDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 56, - "cookies": false, - "type": "", - "demo": "account/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/account/email": { - "patch": { - "summary": "Update Account Email", - "operationId": "accountUpdateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateEmail", - "weight": 54, - "cookies": false, - "type": "", - "demo": "account/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["email", "password"] - } - } - ] - } - }, - "/account/logs": { - "get": { - "summary": "Get Account Logs", - "operationId": "accountGetLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.", - "responses": { - "200": { - "description": "Logs List", - "schema": { "$ref": "#/definitions/logList" } - } - }, - "x-appwrite": { - "method": "getLogs", - "weight": 50, - "cookies": false, - "type": "", - "demo": "account/get-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "limit", - "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/account/name": { - "patch": { - "summary": "Update Account Name", - "operationId": "accountUpdateName", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account name.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 52, - "cookies": false, - "type": "", - "demo": "account/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - } - }, - "/account/password": { - "patch": { - "summary": "Update Account Password", - "operationId": "accountUpdatePassword", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 53, - "cookies": false, - "type": "", - "demo": "account/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "oldPassword": { - "type": "string", - "description": "Current user password. Must be at least 8 chars.", - "default": "", - "x-example": "password" - } - }, - "required": ["password"] - } - } - ] - } - }, - "/account/prefs": { - "get": { - "summary": "Get Account Preferences", - "operationId": "accountGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user preferences as a key-value object.", - "responses": { - "200": { - "description": "Preferences", - "schema": { "$ref": "#/definitions/preferences" } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 48, - "cookies": false, - "type": "", - "demo": "account/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "patch": { - "summary": "Update Account Preferences", - "operationId": "accountUpdatePrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 55, - "cookies": false, - "type": "", - "demo": "account/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - ] - } - }, - "/account/recovery": { - "post": { - "summary": "Create Password Recovery", - "operationId": "accountCreateRecovery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createRecovery", - "weight": 60, - "cookies": false, - "type": "", - "demo": "account/create-recovery.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": ["url:{url},email:{param-email}", "ip:{ip}"], - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - } - }, - "required": ["email", "url"] - } - } - ] - }, - "put": { - "summary": "Create Password Recovery (confirmation)", - "operationId": "accountUpdateRecovery", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", - "responses": { - "200": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "updateRecovery", - "weight": 61, - "cookies": false, - "type": "", - "demo": "account/update-recovery.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-recovery.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid reset token.", - "default": null, - "x-example": "[SECRET]" - }, - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "passwordAgain": { - "type": "string", - "description": "Repeat new user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["userId", "secret", "password", "passwordAgain"] - } - } - ] - } - }, - "/account/sessions": { - "get": { - "summary": "Get Account Sessions", - "operationId": "accountGetSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Get currently logged in user list of active sessions across different devices.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { "$ref": "#/definitions/sessionList" } - } - }, - "x-appwrite": { - "method": "getSessions", - "weight": 49, - "cookies": false, - "type": "", - "demo": "account/get-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - }, - "delete": { - "summary": "Delete All Account Sessions", - "operationId": "accountDeleteSessions", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSessions", - "weight": 59, - "cookies": false, - "type": "", - "demo": "account/delete-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-sessions.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }] - } - }, - "/account/sessions/{sessionId}": { - "get": { - "summary": "Get Session By ID", - "operationId": "accountGetSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "getSession", - "weight": 51, - "cookies": false, - "type": "", - "demo": "account/get-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to get the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Session (Refresh Tokens)", - "operationId": "accountUpdateSession", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "", - "responses": { - "200": { - "description": "Session", - "schema": { "$ref": "#/definitions/session" } - } - }, - "x-appwrite": { - "method": "updateSession", - "weight": 58, - "cookies": false, - "type": "", - "demo": "account/update-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-session.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to update the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Account Session", - "operationId": "accountDeleteSession", - "consumes": ["application/json"], - "produces": [], - "tags": ["account"], - "description": "Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSession", - "weight": 57, - "cookies": false, - "type": "", - "demo": "account/delete-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-session.md", - "rate-limit": 100, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "sessionId", - "description": "Session ID. Use the string 'current' to delete the current device session.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - } - }, - "/account/verification": { - "post": { - "summary": "Create Email Verification", - "operationId": "accountCreateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", - "responses": { - "201": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "createVerification", - "weight": 62, - "cookies": false, - "type": "", - "demo": "account/create-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{userId}", - "scope": "account", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - } - }, - "required": ["url"] - } - } - ] - }, - "put": { - "summary": "Create Email Verification (confirmation)", - "operationId": "accountUpdateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["account"], - "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", - "responses": { - "200": { - "description": "Token", - "schema": { "$ref": "#/definitions/token" } - } - }, - "x-appwrite": { - "method": "updateVerification", - "weight": 63, - "cookies": false, - "type": "", - "demo": "account/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-verification.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},userId:{param-userId}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Valid verification token.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/avatars/browsers/{code}": { - "get": { - "summary": "Get Browser Icon", - "operationId": "avatarsGetBrowser", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getBrowser", - "weight": 65, - "cookies": false, - "type": "location", - "demo": "avatars/get-browser.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Browser Code.", - "required": true, - "type": "string", - "x-example": "aa", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/credit-cards/{code}": { - "get": { - "summary": "Get Credit Card Icon", - "operationId": "avatarsGetCreditCard", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getCreditCard", - "weight": 64, - "cookies": false, - "type": "location", - "demo": "avatars/get-credit-card.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-credit-card.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", - "required": true, - "type": "string", - "x-example": "amex", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/favicon": { - "get": { - "summary": "Get Favicon", - "operationId": "avatarsGetFavicon", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["avatars"], - "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFavicon", - "weight": 68, - "cookies": false, - "type": "location", - "demo": "avatars/get-favicon.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-favicon.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "url", - "description": "Website URL which you want to fetch the favicon from.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - } - ] - } - }, - "/avatars/flags/{code}": { - "get": { - "summary": "Get Country Flag", - "operationId": "avatarsGetFlag", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFlag", - "weight": 66, - "cookies": false, - "type": "location", - "demo": "avatars/get-flag.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-flag.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "code", - "description": "Country Code. ISO Alpha-2 country code format.", - "required": true, - "type": "string", - "x-example": "af", - "in": "path" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "quality", - "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - } - ] - } - }, - "/avatars/image": { - "get": { - "summary": "Get Image from URL", - "operationId": "avatarsGetImage", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["avatars"], - "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getImage", - "weight": 67, - "cookies": false, - "type": "location", - "demo": "avatars/get-image.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-image.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "url", - "description": "Image URL which you want to crop.", - "required": true, - "type": "string", - "format": "url", - "x-example": "https://example.com", - "in": "query" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 2000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - } - ] - } - }, - "/avatars/initials": { - "get": { - "summary": "Get User Initials", - "operationId": "avatarsGetInitials", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getInitials", - "weight": 70, - "cookies": false, - "type": "location", - "demo": "avatars/get-initials.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-initials.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "name", - "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", - "required": false, - "type": "string", - "x-example": "[NAME]", - "default": "", - "in": "query" - }, - { - "name": "width", - "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "height", - "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 500, - "in": "query" - }, - { - "name": "color", - "description": "Changes text color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "background", - "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", - "required": false, - "type": "string", - "default": "", - "in": "query" - } - ] - } - }, - "/avatars/qr": { - "get": { - "summary": "Get QR Code", - "operationId": "avatarsGetQR", - "consumes": ["application/json"], - "produces": ["image/png"], - "tags": ["avatars"], - "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getQR", - "weight": 69, - "cookies": false, - "type": "location", - "demo": "avatars/get-q-r.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-qr.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "text", - "description": "Plain text to be converted to QR code image.", - "required": true, - "type": "string", - "x-example": "[TEXT]", - "in": "query" - }, - { - "name": "size", - "description": "QR code size. Pass an integer between 0 to 1000. Defaults to 400.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 400, - "in": "query" - }, - { - "name": "margin", - "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "download", - "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", - "required": false, - "type": "boolean", - "x-example": false, - "default": false, - "in": "query" - } - ] - } - }, - "/database/collections": { - "get": { - "summary": "List Collections", - "operationId": "databaseListCollections", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Collections List", - "schema": { "$ref": "#/definitions/collectionList" } - } - }, - "x-appwrite": { - "method": "listCollections", - "weight": 72, - "cookies": false, - "type": "", - "demo": "database/list-collections.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-collections.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Collection", - "operationId": "databaseCreateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Collection.", - "responses": { - "201": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "createCollection", - "weight": 71, - "cookies": false, - "type": "", - "demo": "database/create-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "collectionId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[COLLECTION_ID]" - }, - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "document" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": [ - "collectionId", - "name", - "permission", - "read", - "write" - ] - } - } - ] - } - }, - "/database/collections/{collectionId}": { - "get": { - "summary": "Get Collection", - "operationId": "databaseGetCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", - "responses": { - "200": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "getCollection", - "weight": 73, - "cookies": false, - "type": "", - "demo": "database/get-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Collection", - "operationId": "databaseUpdateCollection", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Update a collection by its unique ID.", - "responses": { - "200": { - "description": "Collection", - "schema": { "$ref": "#/definitions/collection" } - } - }, - "x-appwrite": { - "method": "updateCollection", - "weight": 77, - "cookies": false, - "type": "", - "demo": "database/update-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Collection name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "document" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "enabled": { - "type": "boolean", - "description": "Is collection enabled?", - "default": true, - "x-example": false - } - }, - "required": ["name", "permission"] - } - } - ] - }, - "delete": { - "summary": "Delete Collection", - "operationId": "databaseDeleteCollection", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteCollection", - "weight": 78, - "cookies": false, - "type": "", - "demo": "database/delete-collection.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-collection.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/attributes": { - "get": { - "summary": "List Attributes", - "operationId": "databaseListAttributes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "Attributes List", - "schema": { "$ref": "#/definitions/attributeList" } - } - }, - "x-appwrite": { - "method": "listAttributes", - "weight": 87, - "cookies": false, - "type": "", - "demo": "database/list-attributes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-attributes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/attributes/boolean": { - "post": { - "summary": "Create Boolean Attribute", - "operationId": "databaseCreateBooleanAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a boolean attribute.\n", - "responses": { - "201": { - "description": "AttributeBoolean", - "schema": { "$ref": "#/definitions/attributeBoolean" } - } - }, - "x-appwrite": { - "method": "createBooleanAttribute", - "weight": 86, - "cookies": false, - "type": "", - "demo": "database/create-boolean-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-boolean-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": false - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/email": { - "post": { - "summary": "Create Email Attribute", - "operationId": "databaseCreateEmailAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create an email attribute.\n", - "responses": { - "201": { - "description": "AttributeEmail", - "schema": { "$ref": "#/definitions/attributeEmail" } - } - }, - "x-appwrite": { - "method": "createEmailAttribute", - "weight": 80, - "cookies": false, - "type": "", - "demo": "database/create-email-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-email-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "email@example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/enum": { - "post": { - "summary": "Create Enum Attribute", - "operationId": "databaseCreateEnumAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "201": { - "description": "AttributeEnum", - "schema": { "$ref": "#/definitions/attributeEnum" } - } - }, - "x-appwrite": { - "method": "createEnumAttribute", - "weight": 81, - "cookies": false, - "type": "", - "demo": "database/create-enum-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-attribute-enum.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type. Uses length of longest element to determine size.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "[DEFAULT]" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "elements", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/float": { - "post": { - "summary": "Create Float Attribute", - "operationId": "databaseCreateFloatAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "201": { - "description": "AttributeFloat", - "schema": { "$ref": "#/definitions/attributeFloat" } - } - }, - "x-appwrite": { - "method": "createFloatAttribute", - "weight": 85, - "cookies": false, - "type": "", - "demo": "database/create-float-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-float-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "number", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "number", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/integer": { - "post": { - "summary": "Create Integer Attribute", - "operationId": "databaseCreateIntegerAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", - "responses": { - "201": { - "description": "AttributeInteger", - "schema": { "$ref": "#/definitions/attributeInteger" } - } - }, - "x-appwrite": { - "method": "createIntegerAttribute", - "weight": 84, - "cookies": false, - "type": "", - "demo": "database/create-integer-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-integer-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce on new documents", - "default": null, - "x-example": null - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce on new documents", - "default": null, - "x-example": null - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/ip": { - "post": { - "summary": "Create IP Address Attribute", - "operationId": "databaseCreateIpAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create IP address attribute.\n", - "responses": { - "201": { - "description": "AttributeIP", - "schema": { "$ref": "#/definitions/attributeIp" } - } - }, - "x-appwrite": { - "method": "createIpAttribute", - "weight": 82, - "cookies": false, - "type": "", - "demo": "database/create-ip-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-ip-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": null - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/string": { - "post": { - "summary": "Create String Attribute", - "operationId": "databaseCreateStringAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a string attribute.\n", - "responses": { - "201": { - "description": "AttributeString", - "schema": { "$ref": "#/definitions/attributeString" } - } - }, - "x-appwrite": { - "method": "createStringAttribute", - "weight": 79, - "cookies": false, - "type": "", - "demo": "database/create-string-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-string-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "size": { - "type": "integer", - "description": "Attribute size for text attributes, in number of characters.", - "default": null, - "x-example": 1 - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "[DEFAULT]" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "size", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/url": { - "post": { - "summary": "Create URL Attribute", - "operationId": "databaseCreateUrlAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a URL attribute.\n", - "responses": { - "201": { - "description": "AttributeURL", - "schema": { "$ref": "#/definitions/attributeUrl" } - } - }, - "x-appwrite": { - "method": "createUrlAttribute", - "weight": 83, - "cookies": false, - "type": "", - "demo": "database/create-url-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-url-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "default": null, - "x-example": null - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "default": null, - "x-example": false - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "default": null, - "x-example": "https://example.com" - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "default": false, - "x-example": false - } - }, - "required": ["key", "required"] - } - } - ] - } - }, - "/database/collections/{collectionId}/attributes/{key}": { - "get": { - "summary": "Get Attribute", - "operationId": "databaseGetAttribute", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString", - "schema": { - "x-oneOf": [ - { "$ref": "#/definitions/attributeBoolean" }, - { "$ref": "#/definitions/attributeInteger" }, - { "$ref": "#/definitions/attributeFloat" }, - { "$ref": "#/definitions/attributeEmail" }, - { "$ref": "#/definitions/attributeEnum" }, - { "$ref": "#/definitions/attributeUrl" }, - { "$ref": "#/definitions/attributeIp" }, - { "$ref": "#/definitions/attributeString" } - ] - } - } - }, - "x-appwrite": { - "method": "getAttribute", - "weight": 88, - "cookies": false, - "type": "", - "demo": "database/get-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Attribute", - "operationId": "databaseDeleteAttribute", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteAttribute", - "weight": 89, - "cookies": false, - "type": "", - "demo": "database/delete-attribute.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-attribute.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Attribute Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/documents": { - "get": { - "summary": "List Documents", - "operationId": "databaseListDocuments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Documents List", - "schema": { "$ref": "#/definitions/documentList" } - } - }, - "x-appwrite": { - "method": "listDocuments", - "weight": 95, - "cookies": false, - "type": "", - "demo": "database/list-documents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-documents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "queries", - "description": "Array of query strings.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderAttributes", - "description": "Array of attributes used to sort results.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - }, - { - "name": "orderTypes", - "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "default": [], - "in": "query" - } - ] - }, - "post": { - "summary": "Create Document", - "operationId": "databaseCreateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", - "responses": { - "201": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "createDocument", - "weight": 94, - "cookies": false, - "type": "", - "demo": "database/create-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "documentId": { - "type": "string", - "description": "Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[DOCUMENT_ID]" - }, - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": ["documentId", "data"] - } - } - ] - } - }, - "/database/collections/{collectionId}/documents/{documentId}": { - "get": { - "summary": "Get Document", - "operationId": "databaseGetDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", - "responses": { - "200": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "getDocument", - "weight": 96, - "cookies": false, - "type": "", - "demo": "database/get-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Document", - "operationId": "databaseUpdateDocument", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", - "responses": { - "200": { - "description": "Document", - "schema": { "$ref": "#/definitions/document" } - } - }, - "x-appwrite": { - "method": "updateDocument", - "weight": 98, - "cookies": false, - "type": "", - "demo": "database/update-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID.", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "description": "Document data as JSON object.", - "default": {}, - "x-example": "{}" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - }, - "required": ["data"] - } - } - ] - }, - "delete": { - "summary": "Delete Document", - "operationId": "databaseDeleteDocument", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteDocument", - "weight": 99, - "cookies": false, - "type": "", - "demo": "database/delete-document.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-document.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "documents.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "documentId", - "description": "Document ID.", - "required": true, - "type": "string", - "x-example": "[DOCUMENT_ID]", - "in": "path" - } - ] - } - }, - "/database/collections/{collectionId}/indexes": { - "get": { - "summary": "List Indexes", - "operationId": "databaseListIndexes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "Indexes List", - "schema": { "$ref": "#/definitions/indexList" } - } - }, - "x-appwrite": { - "method": "listIndexes", - "weight": 91, - "cookies": false, - "type": "", - "demo": "database/list-indexes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-indexes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - } - ] - }, - "post": { - "summary": "Create Index", - "operationId": "databaseCreateIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "201": { - "description": "Index", - "schema": { "$ref": "#/definitions/index" } - } - }, - "x-appwrite": { - "method": "createIndex", - "weight": 90, - "cookies": false, - "type": "", - "demo": "database/create-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "default": null, - "x-example": null - }, - "type": { - "type": "string", - "description": "Index type.", - "default": null, - "x-example": "key" - }, - "attributes": { - "type": "array", - "description": "Array of attributes to index.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "orders": { - "type": "array", - "description": "Array of index orders.", - "default": [], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["key", "type", "attributes"] - } - } - ] - } - }, - "/database/collections/{collectionId}/indexes/{key}": { - "get": { - "summary": "Get Index", - "operationId": "databaseGetIndex", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["database"], - "description": "", - "responses": { - "200": { - "description": "Index", - "schema": { "$ref": "#/definitions/index" } - } - }, - "x-appwrite": { - "method": "getIndex", - "weight": 92, - "cookies": false, - "type": "", - "demo": "database/get-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Index", - "operationId": "databaseDeleteIndex", - "consumes": ["application/json"], - "produces": [], - "tags": ["database"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteIndex", - "weight": 93, - "cookies": false, - "type": "", - "demo": "database/delete-index.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-index.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "collections.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "collectionId", - "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", - "required": true, - "type": "string", - "x-example": "[COLLECTION_ID]", - "in": "path" - }, - { - "name": "key", - "description": "Index Key.", - "required": true, - "type": "string", - "in": "path" - } - ] - } - }, - "/functions": { - "get": { - "summary": "List Functions", - "operationId": "functionsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the project's functions. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Functions List", - "schema": { "$ref": "#/definitions/functionList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 193, - "cookies": false, - "type": "", - "demo": "functions/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Function", - "operationId": "functionsCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new function. You can pass a list of [permissions](/docs/permissions) to allow different project users or team with access to execute the function using the client API.", - "responses": { - "201": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 192, - "cookies": false, - "type": "", - "demo": "functions/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "functionId": { - "type": "string", - "description": "Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[FUNCTION_ID]" - }, - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "execute": { - "type": "array", - "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "runtime": { - "type": "string", - "description": "Execution runtime.", - "default": null, - "x-example": "node-14.5" - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Function maximum execution time in seconds.", - "default": 15, - "x-example": 1 - } - }, - "required": ["functionId", "name", "execute", "runtime"] - } - } - ] - } - }, - "/functions/runtimes": { - "get": { - "summary": "List the currently active function runtimes.", - "operationId": "functionsListRuntimes", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all runtimes that are currently active on your instance.", - "responses": { - "200": { - "description": "Runtimes List", - "schema": { "$ref": "#/definitions/runtimeList" } - } - }, - "x-appwrite": { - "method": "listRuntimes", - "weight": 194, - "cookies": false, - "type": "", - "demo": "functions/list-runtimes.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-runtimes.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/functions/{functionId}": { - "get": { - "summary": "Get Function", - "operationId": "functionsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 195, - "cookies": false, - "type": "", - "demo": "functions/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Function", - "operationId": "functionsUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Update function by its unique ID.", - "responses": { - "200": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "update", - "weight": 197, - "cookies": false, - "type": "", - "demo": "functions/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Function name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "execute": { - "type": "array", - "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "vars": { - "type": "object", - "description": "Key-value JSON object that will be passed to the function as environment variables.", - "default": [], - "x-example": "{}" - }, - "events": { - "type": "array", - "description": "Events list.", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "schedule": { - "type": "string", - "description": "Schedule CRON syntax.", - "default": "", - "x-example": null - }, - "timeout": { - "type": "integer", - "description": "Maximum execution time in seconds.", - "default": 15, - "x-example": 1 - } - }, - "required": ["name", "execute"] - } - } - ] - }, - "delete": { - "summary": "Delete Function", - "operationId": "functionsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a function by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 199, - "cookies": false, - "type": "", - "demo": "functions/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-function.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/deployments": { - "get": { - "summary": "List Deployments", - "operationId": "functionsListDeployments", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the project's code deployments. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { "$ref": "#/definitions/deploymentList" } - } - }, - "x-appwrite": { - "method": "listDeployments", - "weight": 201, - "cookies": false, - "type": "", - "demo": "functions/list-deployments.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-deployments.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Deployment", - "operationId": "functionsCreateDeployment", - "consumes": ["multipart/form-data"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](/docs/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.", - "responses": { - "201": { - "description": "Deployment", - "schema": { "$ref": "#/definitions/deployment" } - } - }, - "x-appwrite": { - "method": "createDeployment", - "weight": 200, - "cookies": false, - "type": "", - "demo": "functions/create-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": true, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "entrypoint", - "description": "Entrypoint File.", - "required": true, - "type": "string", - "x-example": "[ENTRYPOINT]", - "in": "formData" - }, - { - "name": "code", - "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "activate", - "description": "Automatically activate the deployment when it is finished building.", - "required": true, - "type": "boolean", - "x-example": false, - "in": "formData" - } - ] - } - }, - "/functions/{functionId}/deployments/{deploymentId}": { - "get": { - "summary": "Get Deployment", - "operationId": "functionsGetDeployment", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a code deployment by its unique ID.", - "responses": { - "200": { - "description": "Deployments List", - "schema": { "$ref": "#/definitions/deploymentList" } - } - }, - "x-appwrite": { - "method": "getDeployment", - "weight": 202, - "cookies": false, - "type": "", - "demo": "functions/get-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Function Deployment", - "operationId": "functionsUpdateDeployment", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.", - "responses": { - "200": { - "description": "Function", - "schema": { "$ref": "#/definitions/function" } - } - }, - "x-appwrite": { - "method": "updateDeployment", - "weight": 198, - "cookies": false, - "type": "", - "demo": "functions/update-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete Deployment", - "operationId": "functionsDeleteDeployment", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "Delete a code deployment by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteDeployment", - "weight": 203, - "cookies": false, - "type": "", - "demo": "functions/delete-deployment.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-deployment.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}": { - "post": { - "summary": "Retry Build", - "operationId": "functionsRetryBuild", - "consumes": ["application/json"], - "produces": [], - "tags": ["functions"], - "description": "", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "retryBuild", - "weight": 207, - "cookies": false, - "type": "", - "demo": "functions/retry-build.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/retry-build.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "functions.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "deploymentId", - "description": "Deployment ID.", - "required": true, - "type": "string", - "x-example": "[DEPLOYMENT_ID]", - "in": "path" - }, - { - "name": "buildId", - "description": "Build unique ID.", - "required": true, - "type": "string", - "x-example": "[BUILD_ID]", - "in": "path" - } - ] - } - }, - "/functions/{functionId}/executions": { - "get": { - "summary": "List Executions", - "operationId": "functionsListExecutions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Executions List", - "schema": { "$ref": "#/definitions/executionList" } - } - }, - "x-appwrite": { - "method": "listExecutions", - "weight": 205, - "cookies": false, - "type": "", - "demo": "functions/list-executions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-executions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Execution", - "operationId": "functionsCreateExecution", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", - "responses": { - "201": { - "description": "Execution", - "schema": { "$ref": "#/definitions/execution" } - } - }, - "x-appwrite": { - "method": "createExecution", - "weight": 204, - "cookies": false, - "type": "", - "demo": "functions/create-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "data": { - "type": "string", - "description": "String of custom data to send to function.", - "default": "", - "x-example": "[DATA]" - }, - "async": { - "type": "boolean", - "description": "Execute code asynchronously. Default value is true.", - "default": true, - "x-example": false - } - } - } - } - ] - } - }, - "/functions/{functionId}/executions/{executionId}": { - "get": { - "summary": "Get Execution", - "operationId": "functionsGetExecution", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["functions"], - "description": "Get a function execution log by its unique ID.", - "responses": { - "200": { - "description": "Execution", - "schema": { "$ref": "#/definitions/execution" } - } - }, - "x-appwrite": { - "method": "getExecution", - "weight": 206, - "cookies": false, - "type": "", - "demo": "functions/get-execution.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-execution.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "execution.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "functionId", - "description": "Function ID.", - "required": true, - "type": "string", - "x-example": "[FUNCTION_ID]", - "in": "path" - }, - { - "name": "executionId", - "description": "Execution ID.", - "required": true, - "type": "string", - "x-example": "[EXECUTION_ID]", - "in": "path" - } - ] - } - }, - "/health": { - "get": { - "summary": "Get HTTP", - "operationId": "healthGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite HTTP server is up and responsive.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 107, - "cookies": false, - "type": "", - "demo": "health/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/anti-virus": { - "get": { - "summary": "Get Antivirus", - "operationId": "healthGetAntivirus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite Antivirus server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Antivirus", - "schema": { "$ref": "#/definitions/healthAntivirus" } - } - }, - "x-appwrite": { - "method": "getAntivirus", - "weight": 118, - "cookies": false, - "type": "", - "demo": "health/get-antivirus.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-anti-virus.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/cache": { - "get": { - "summary": "Get Cache", - "operationId": "healthGetCache", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite in-memory cache server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "getCache", - "weight": 110, - "cookies": false, - "type": "", - "demo": "health/get-cache.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-cache.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/db": { - "get": { - "summary": "Get DB", - "operationId": "healthGetDB", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite database server is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "getDB", - "weight": 109, - "cookies": false, - "type": "", - "demo": "health/get-d-b.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-db.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/certificates": { - "get": { - "summary": "Get Certificates Queue", - "operationId": "healthGetQueueCertificates", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueCertificates", - "weight": 115, - "cookies": false, - "type": "", - "demo": "health/get-queue-certificates.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-certificates.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/functions": { - "get": { - "summary": "Get Functions Queue", - "operationId": "healthGetQueueFunctions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueFunctions", - "weight": 116, - "cookies": false, - "type": "", - "demo": "health/get-queue-functions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-functions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/logs": { - "get": { - "summary": "Get Logs Queue", - "operationId": "healthGetQueueLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueLogs", - "weight": 113, - "cookies": false, - "type": "", - "demo": "health/get-queue-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/usage": { - "get": { - "summary": "Get Usage Queue", - "operationId": "healthGetQueueUsage", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueUsage", - "weight": 114, - "cookies": false, - "type": "", - "demo": "health/get-queue-usage.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/queue/webhooks": { - "get": { - "summary": "Get Webhooks Queue", - "operationId": "healthGetQueueWebhooks", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", - "responses": { - "200": { - "description": "Health Queue", - "schema": { "$ref": "#/definitions/healthQueue" } - } - }, - "x-appwrite": { - "method": "getQueueWebhooks", - "weight": 112, - "cookies": false, - "type": "", - "demo": "health/get-queue-webhooks.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-webhooks.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/storage/local": { - "get": { - "summary": "Get Local Storage", - "operationId": "healthGetStorageLocal", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite local storage device is up and connection is successful.", - "responses": { - "200": { - "description": "Health Status", - "schema": { "$ref": "#/definitions/healthStatus" } - } - }, - "x-appwrite": { - "method": "getStorageLocal", - "weight": 117, - "cookies": false, - "type": "", - "demo": "health/get-storage-local.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-local.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/health/time": { - "get": { - "summary": "Get Time", - "operationId": "healthGetTime", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["health"], - "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", - "responses": { - "200": { - "description": "Health Time", - "schema": { "$ref": "#/definitions/healthTime" } - } - }, - "x-appwrite": { - "method": "getTime", - "weight": 111, - "cookies": false, - "type": "", - "demo": "health/get-time.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-time.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "health.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }] - } - }, - "/locale": { - "get": { - "summary": "Get User Locale", - "operationId": "localeGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))", - "responses": { - "200": { - "description": "Locale", - "schema": { "$ref": "#/definitions/locale" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 100, - "cookies": false, - "type": "", - "demo": "locale/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-locale.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/continents": { - "get": { - "summary": "List Continents", - "operationId": "localeGetContinents", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all continents. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Continents List", - "schema": { "$ref": "#/definitions/continentList" } - } - }, - "x-appwrite": { - "method": "getContinents", - "weight": 104, - "cookies": false, - "type": "", - "demo": "locale/get-continents.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-continents.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/countries": { - "get": { - "summary": "List Countries", - "operationId": "localeGetCountries", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { "$ref": "#/definitions/countryList" } - } - }, - "x-appwrite": { - "method": "getCountries", - "weight": 101, - "cookies": false, - "type": "", - "demo": "locale/get-countries.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/countries/eu": { - "get": { - "summary": "List EU Countries", - "operationId": "localeGetCountriesEU", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Countries List", - "schema": { "$ref": "#/definitions/countryList" } - } - }, - "x-appwrite": { - "method": "getCountriesEU", - "weight": 102, - "cookies": false, - "type": "", - "demo": "locale/get-countries-e-u.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-eu.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/countries/phones": { - "get": { - "summary": "List Countries Phone Codes", - "operationId": "localeGetCountriesPhones", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Phones List", - "schema": { "$ref": "#/definitions/phoneList" } - } - }, - "x-appwrite": { - "method": "getCountriesPhones", - "weight": 103, - "cookies": false, - "type": "", - "demo": "locale/get-countries-phones.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-phones.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/currencies": { - "get": { - "summary": "List Currencies", - "operationId": "localeGetCurrencies", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", - "responses": { - "200": { - "description": "Currencies List", - "schema": { "$ref": "#/definitions/currencyList" } - } - }, - "x-appwrite": { - "method": "getCurrencies", - "weight": 105, - "cookies": false, - "type": "", - "demo": "locale/get-currencies.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-currencies.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/locale/languages": { - "get": { - "summary": "List Languages", - "operationId": "localeGetLanguages", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["locale"], - "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", - "responses": { - "200": { - "description": "Languages List", - "schema": { "$ref": "#/definitions/languageList" } - } - }, - "x-appwrite": { - "method": "getLanguages", - "weight": 106, - "cookies": false, - "type": "", - "demo": "locale/get-languages.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-languages.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "locale.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }] - } - }, - "/storage/buckets": { - "get": { - "summary": "List buckets", - "operationId": "storageListBuckets", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Buckets List", - "schema": { "$ref": "#/definitions/bucketList" } - } - }, - "x-appwrite": { - "method": "listBuckets", - "weight": 151, - "cookies": false, - "type": "", - "demo": "storage/list-buckets.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-buckets.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Results offset. The default value is 0. Use this param to manage pagination.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create bucket", - "operationId": "storageCreateBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Create a new storage bucket.", - "responses": { - "201": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "createBucket", - "weight": 150, - "cookies": false, - "type": "", - "demo": "storage/create-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "bucketId": { - "type": "string", - "description": "Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[BUCKET_ID]" - }, - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "file" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled?", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", - "default": 30000000, - "x-example": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["bucketId", "name", "permission"] - } - } - ] - } - }, - "/storage/buckets/{bucketId}": { - "get": { - "summary": "Get Bucket", - "operationId": "storageGetBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", - "responses": { - "200": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "getBucket", - "weight": 152, - "cookies": false, - "type": "", - "demo": "storage/get-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Bucket", - "operationId": "storageUpdateBucket", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Update a storage bucket by its unique ID.", - "responses": { - "200": { - "description": "Bucket", - "schema": { "$ref": "#/definitions/bucket" } - } - }, - "x-appwrite": { - "method": "updateBucket", - "weight": 153, - "cookies": false, - "type": "", - "demo": "storage/update-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Bucket name", - "default": null, - "x-example": "[NAME]" - }, - "permission": { - "type": "string", - "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "file" - }, - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "enabled": { - "type": "boolean", - "description": "Is bucket enabled?", - "default": true, - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", - "default": null, - "x-example": null - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions", - "default": [], - "x-example": null, - "items": { "type": "string" } - }, - "encryption": { - "type": "boolean", - "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", - "default": true, - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", - "default": true, - "x-example": false - } - }, - "required": ["name", "permission"] - } - } - ] - }, - "delete": { - "summary": "Delete Bucket", - "operationId": "storageDeleteBucket", - "consumes": ["application/json"], - "produces": [], - "tags": ["storage"], - "description": "Delete a storage bucket by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteBucket", - "weight": 154, - "cookies": false, - "type": "", - "demo": "storage/delete-bucket.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-bucket.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "buckets.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Bucket unique ID.", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files": { - "get": { - "summary": "List Files", - "operationId": "storageListFiles", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Files List", - "schema": { "$ref": "#/definitions/fileList" } - } - }, - "x-appwrite": { - "method": "listFiles", - "weight": 156, - "cookies": false, - "type": "", - "demo": "storage/list-files.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-files.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create File", - "operationId": "storageCreateFile", - "consumes": ["multipart/form-data"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", - "responses": { - "201": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "createFile", - "weight": 155, - "cookies": false, - "type": "upload", - "demo": "storage/create-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "required": true, - "x-upload-id": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "formData" - }, - { - "name": "file", - "description": "Binary file.", - "required": true, - "type": "file", - "in": "formData" - }, - { - "name": "read", - "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "x-example": "[\"role:all\"]", - "in": "formData" - }, - { - "name": "write", - "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "required": false, - "type": "array", - "collectionFormat": "multi", - "items": { "type": "string" }, - "x-example": "[\"role:all\"]", - "in": "formData" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}": { - "get": { - "summary": "Get File", - "operationId": "storageGetFile", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", - "responses": { - "200": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "getFile", - "weight": 157, - "cookies": false, - "type": "", - "demo": "storage/get-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update File", - "operationId": "storageUpdateFile", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["storage"], - "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", - "responses": { - "200": { - "description": "File", - "schema": { "$ref": "#/definitions/file" } - } - }, - "x-appwrite": { - "method": "updateFile", - "weight": 161, - "cookies": false, - "type": "", - "demo": "storage/update-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "read": { - "type": "array", - "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - }, - "write": { - "type": "array", - "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", - "default": null, - "x-example": "[\"role:all\"]", - "items": { "type": "string" } - } - } - } - } - ] - }, - "delete": { - "summary": "Delete File", - "operationId": "storageDeleteFile", - "consumes": ["application/json"], - "produces": [], - "tags": ["storage"], - "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteFile", - "weight": 162, - "cookies": false, - "type": "", - "demo": "storage/delete-file.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/download": { - "get": { - "summary": "Get File for Download", - "operationId": "storageGetFileDownload", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["storage"], - "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", - "responses": { - "200": { "description": "File", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFileDownload", - "weight": 159, - "cookies": false, - "type": "location", - "demo": "storage/get-file-download.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-download.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/preview": { - "get": { - "summary": "Get File Preview", - "operationId": "storageGetFilePreview", - "consumes": ["application/json"], - "produces": ["image/*"], - "tags": ["storage"], - "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", - "responses": { - "200": { "description": "Image", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFilePreview", - "weight": 158, - "cookies": false, - "type": "location", - "demo": "storage/get-file-preview.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-preview.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - }, - { - "name": "width", - "description": "Resize preview image width, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "height", - "description": "Resize preview image height, Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "gravity", - "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", - "required": false, - "type": "string", - "x-example": "center", - "default": "center", - "in": "query" - }, - { - "name": "quality", - "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 100, - "in": "query" - }, - { - "name": "borderWidth", - "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "borderColor", - "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "borderRadius", - "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "opacity", - "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", - "required": false, - "type": "number", - "format": "float", - "x-example": 0, - "default": 1, - "in": "query" - }, - { - "name": "rotation", - "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": -360, - "default": 0, - "in": "query" - }, - { - "name": "background", - "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", - "required": false, - "type": "string", - "default": "", - "in": "query" - }, - { - "name": "output", - "description": "Output format type (jpeg, jpg, png, gif and webp).", - "required": false, - "type": "string", - "x-example": "jpg", - "default": "", - "in": "query" - } - ] - } - }, - "/storage/buckets/{bucketId}/files/{fileId}/view": { - "get": { - "summary": "Get File for View", - "operationId": "storageGetFileView", - "consumes": ["application/json"], - "produces": ["*/*"], - "tags": ["storage"], - "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", - "responses": { - "200": { "description": "File", "schema": { "type": "file" } } - }, - "x-appwrite": { - "method": "getFileView", - "weight": 160, - "cookies": false, - "type": "location", - "demo": "storage/get-file-view.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-view.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "files.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "bucketId", - "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", - "required": true, - "type": "string", - "x-example": "[BUCKET_ID]", - "in": "path" - }, - { - "name": "fileId", - "description": "File ID.", - "required": true, - "type": "string", - "x-example": "[FILE_ID]", - "in": "path" - } - ] - } - }, - "/teams": { - "get": { - "summary": "List Teams", - "operationId": "teamsList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin).", - "responses": { - "200": { - "description": "Teams List", - "schema": { "$ref": "#/definitions/teamList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 166, - "cookies": false, - "type": "", - "demo": "teams/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-teams.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Team", - "operationId": "teamsCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", - "responses": { - "201": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 165, - "cookies": false, - "type": "", - "demo": "teams/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[TEAM_ID]" - }, - "name": { - "type": "string", - "description": "Team name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", - "default": ["owner"], - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["teamId", "name"] - } - } - ] - } - }, - "/teams/{teamId}": { - "get": { - "summary": "Get Team", - "operationId": "teamsGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team by its ID. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 167, - "cookies": false, - "type": "", - "demo": "teams/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - } - ] - }, - "put": { - "summary": "Update Team", - "operationId": "teamsUpdate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Update a team using its ID. Only members with the owner role can update the team.", - "responses": { - "200": { - "description": "Team", - "schema": { "$ref": "#/definitions/team" } - } - }, - "x-appwrite": { - "method": "update", - "weight": 168, - "cookies": false, - "type": "", - "demo": "teams/update.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "New team name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - }, - "delete": { - "summary": "Delete Team", - "operationId": "teamsDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 169, - "cookies": false, - "type": "", - "demo": "teams/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships": { - "get": { - "summary": "Get Team Memberships", - "operationId": "teamsGetMemberships", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMemberships", - "weight": 171, - "cookies": false, - "type": "", - "demo": "teams/get-memberships.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-members.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create Team Membership", - "operationId": "teamsCreateMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.", - "responses": { - "201": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "createMembership", - "weight": 170, - "cookies": false, - "type": "", - "demo": "teams/create-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team-membership.md", - "rate-limit": 10, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email of the new team member.", - "default": null, - "x-example": "email@example.com" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - }, - "url": { - "type": "string", - "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", - "default": null, - "x-example": "https://example.com" - }, - "name": { - "type": "string", - "description": "Name of the new team member. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["email", "roles", "url"] - } - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}": { - "get": { - "summary": "Get Team Membership", - "operationId": "teamsGetMembership", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Get a team member by the membership unique id. All team members have read access for this resource.", - "responses": { - "200": { - "description": "Memberships List", - "schema": { "$ref": "#/definitions/membershipList" } - } - }, - "x-appwrite": { - "method": "getMembership", - "weight": 172, - "cookies": false, - "type": "", - "demo": "teams/get-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-member.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.read", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update Membership Roles", - "operationId": "teamsUpdateMembershipRoles", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions).", - "responses": { - "200": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "updateMembershipRoles", - "weight": 173, - "cookies": false, - "type": "", - "demo": "teams/update-membership-roles.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-roles.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Max length for each role is 32 chars.", - "default": null, - "x-example": null, - "items": { "type": "string" } - } - }, - "required": ["roles"] - } - } - ] - }, - "delete": { - "summary": "Delete Team Membership", - "operationId": "teamsDeleteMembership", - "consumes": ["application/json"], - "produces": [], - "tags": ["teams"], - "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteMembership", - "weight": 175, - "cookies": false, - "type": "", - "demo": "teams/delete-membership.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team-membership.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "teams.write", - "platforms": ["client", "server", "server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - } - ] - } - }, - "/teams/{teamId}/memberships/{membershipId}/status": { - "patch": { - "summary": "Update Team Membership Status", - "operationId": "teamsUpdateMembershipStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["teams"], - "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", - "responses": { - "200": { - "description": "Membership", - "schema": { "$ref": "#/definitions/membership" } - } - }, - "x-appwrite": { - "method": "updateMembershipStatus", - "weight": 174, - "cookies": false, - "type": "", - "demo": "teams/update-membership-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "public", - "platforms": ["client", "server"], - "packaging": false, - "auth": { "Project": [], "JWT": [] } - }, - "security": [{ "Project": [], "JWT": [] }], - "parameters": [ - { - "name": "teamId", - "description": "Team ID.", - "required": true, - "type": "string", - "x-example": "[TEAM_ID]", - "in": "path" - }, - { - "name": "membershipId", - "description": "Membership ID.", - "required": true, - "type": "string", - "x-example": "[MEMBERSHIP_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID.", - "default": null, - "x-example": "[USER_ID]" - }, - "secret": { - "type": "string", - "description": "Secret key.", - "default": null, - "x-example": "[SECRET]" - } - }, - "required": ["userId", "secret"] - } - } - ] - } - }, - "/users": { - "get": { - "summary": "List Users", - "operationId": "usersList", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get a list of all the project's users. You can use the query params to filter your results.", - "responses": { - "200": { - "description": "Users List", - "schema": { "$ref": "#/definitions/userList" } - } - }, - "x-appwrite": { - "method": "list", - "weight": 177, - "cookies": false, - "type": "", - "demo": "users/list.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-users.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "type": "string", - "x-example": "[SEARCH]", - "default": "", - "in": "query" - }, - { - "name": "limit", - "description": "Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - }, - { - "name": "cursor", - "description": "ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "string", - "x-example": "[CURSOR]", - "default": "", - "in": "query" - }, - { - "name": "cursorDirection", - "description": "Direction of the cursor.", - "required": false, - "type": "string", - "x-example": "after", - "default": "after", - "in": "query" - }, - { - "name": "orderType", - "description": "Order result by ASC or DESC order.", - "required": false, - "type": "string", - "x-example": "ASC", - "default": "ASC", - "in": "query" - } - ] - }, - "post": { - "summary": "Create User", - "operationId": "usersCreate", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Create a new user.", - "responses": { - "201": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "create", - "weight": 176, - "cookies": false, - "type": "", - "demo": "users/create.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "description": "User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, - "x-example": "[USER_ID]" - }, - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - }, - "password": { - "type": "string", - "description": "User password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - }, - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": "", - "x-example": "[NAME]" - } - }, - "required": ["userId", "email", "password"] - } - } - ] - } - }, - "/users/{userId}": { - "get": { - "summary": "Get User", - "operationId": "usersGet", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get a user by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "get", - "weight": 178, - "cookies": false, - "type": "", - "demo": "users/get.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete User", - "operationId": "usersDelete", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete a user by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "delete", - "weight": 190, - "cookies": false, - "type": "", - "demo": "users/delete.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - } - }, - "/users/{userId}/email": { - "patch": { - "summary": "Update Email", - "operationId": "usersUpdateEmail", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user email by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateEmail", - "weight": 186, - "cookies": false, - "type": "", - "demo": "users/update-email.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-email.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "User email.", - "default": null, - "x-example": "email@example.com" - } - }, - "required": ["email"] - } - } - ] - } - }, - "/users/{userId}/logs": { - "get": { - "summary": "Get User Logs", - "operationId": "usersGetLogs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user activity logs list by its unique ID.", - "responses": { - "200": { - "description": "Logs List", - "schema": { "$ref": "#/definitions/logList" } - } - }, - "x-appwrite": { - "method": "getLogs", - "weight": 181, - "cookies": false, - "type": "", - "demo": "users/get-logs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-logs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "limit", - "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 25, - "in": "query" - }, - { - "name": "offset", - "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", - "required": false, - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0, - "in": "query" - } - ] - } - }, - "/users/{userId}/name": { - "patch": { - "summary": "Update Name", - "operationId": "usersUpdateName", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user name by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateName", - "weight": 184, - "cookies": false, - "type": "", - "demo": "users/update-name.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "User name. Max length: 128 chars.", - "default": null, - "x-example": "[NAME]" - } - }, - "required": ["name"] - } - } - ] - } - }, - "/users/{userId}/password": { - "patch": { - "summary": "Update Password", - "operationId": "usersUpdatePassword", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user password by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updatePassword", - "weight": 185, - "cookies": false, - "type": "", - "demo": "users/update-password.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-password.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "New user password. Must be at least 8 chars.", - "default": null, - "x-example": "password" - } - }, - "required": ["password"] - } - } - ] - } - }, - "/users/{userId}/prefs": { - "get": { - "summary": "Get User Preferences", - "operationId": "usersGetPrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user preferences by its unique ID.", - "responses": { - "200": { - "description": "Preferences", - "schema": { "$ref": "#/definitions/preferences" } - } - }, - "x-appwrite": { - "method": "getPrefs", - "weight": 179, - "cookies": false, - "type": "", - "demo": "users/get-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - }, - "patch": { - "summary": "Update User Preferences", - "operationId": "usersUpdatePrefs", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", - "responses": { - "200": { - "description": "Preferences", - "schema": { "$ref": "#/definitions/preferences" } - } - }, - "x-appwrite": { - "method": "updatePrefs", - "weight": 187, - "cookies": false, - "type": "", - "demo": "users/update-prefs.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-prefs.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "prefs": { - "type": "object", - "description": "Prefs key-value JSON object.", - "default": {}, - "x-example": "{}" - } - }, - "required": ["prefs"] - } - } - ] - } - }, - "/users/{userId}/sessions": { - "get": { - "summary": "Get User Sessions", - "operationId": "usersGetSessions", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Get the user sessions list by its unique ID.", - "responses": { - "200": { - "description": "Sessions List", - "schema": { "$ref": "#/definitions/sessionList" } - } - }, - "x-appwrite": { - "method": "getSessions", - "weight": 180, - "cookies": false, - "type": "", - "demo": "users/get-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.read", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - }, - "delete": { - "summary": "Delete User Sessions", - "operationId": "usersDeleteSessions", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete all user's sessions by using the user's unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSessions", - "weight": 189, - "cookies": false, - "type": "", - "demo": "users/delete-sessions.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-sessions.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - } - ] - } - }, - "/users/{userId}/sessions/{sessionId}": { - "delete": { - "summary": "Delete User Session", - "operationId": "usersDeleteSession", - "consumes": ["application/json"], - "produces": [], - "tags": ["users"], - "description": "Delete a user sessions by its unique ID.", - "responses": { "204": { "description": "No content" } }, - "x-appwrite": { - "method": "deleteSession", - "weight": 188, - "cookies": false, - "type": "", - "demo": "users/delete-session.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-session.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "sessionId", - "description": "Session ID.", - "required": true, - "type": "string", - "x-example": "[SESSION_ID]", - "in": "path" - } - ] - } - }, - "/users/{userId}/status": { - "patch": { - "summary": "Update User Status", - "operationId": "usersUpdateStatus", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateStatus", - "weight": 182, - "cookies": false, - "type": "", - "demo": "users/update-status.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-status.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", - "default": null, - "x-example": false - } - }, - "required": ["status"] - } - } - ] - } - }, - "/users/{userId}/verification": { - "patch": { - "summary": "Update Email Verification", - "operationId": "usersUpdateVerification", - "consumes": ["application/json"], - "produces": ["application/json"], - "tags": ["users"], - "description": "Update the user email verification status by its unique ID.", - "responses": { - "200": { - "description": "User", - "schema": { "$ref": "#/definitions/user" } - } - }, - "x-appwrite": { - "method": "updateVerification", - "weight": 183, - "cookies": false, - "type": "", - "demo": "users/update-verification.md", - "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-verification.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "users.write", - "platforms": ["server"], - "packaging": false, - "auth": { "Project": [], "Key": [] } - }, - "security": [{ "Project": [], "Key": [] }], - "parameters": [ - { - "name": "userId", - "description": "User ID.", - "required": true, - "type": "string", - "x-example": "[USER_ID]", - "in": "path" - }, - { - "name": "payload", - "in": "body", - "schema": { - "type": "object", - "properties": { - "emailVerification": { - "type": "boolean", - "description": "User email verification status.", - "default": null, - "x-example": false - } - }, - "required": ["emailVerification"] - } - } - ] - } - } - }, - "tags": [ - { - "name": "account", - "description": "The Account service allows you to authenticate and manage a user account." - }, - { - "name": "avatars", - "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." - }, - { - "name": "database", - "description": "The Database service allows you to create structured collections of documents, query and filter lists of documents" - }, - { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." - }, - { - "name": "health", - "description": "The Health service allows you to both validate and monitor your Appwrite server's health." - }, - { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." - }, - { - "name": "storage", - "description": "The Storage service allows you to manage your project files." - }, - { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" - }, - { - "name": "users", - "description": "The Users service allows you to manage your project users." - }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - } - ], - "definitions": { - "documentList": { - "description": "Documents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of documents documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "documents": { - "type": "array", - "description": "List of documents.", - "items": { "type": "object", "$ref": "#/definitions/document" }, - "x-example": "" - } - }, - "required": ["total", "documents"] - }, - "collectionList": { - "description": "Collections List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of collections documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "collections": { - "type": "array", - "description": "List of collections.", - "items": { "type": "object", "$ref": "#/definitions/collection" }, - "x-example": "" - } - }, - "required": ["total", "collections"] - }, - "indexList": { - "description": "Indexes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of indexes documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "indexes": { - "type": "array", - "description": "List of indexes.", - "items": { "type": "object", "$ref": "#/definitions/index" }, - "x-example": "" - } - }, - "required": ["total", "indexes"] - }, - "userList": { - "description": "Users List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of users documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "users": { - "type": "array", - "description": "List of users.", - "items": { "type": "object", "$ref": "#/definitions/user" }, - "x-example": "" - } - }, - "required": ["total", "users"] - }, - "sessionList": { - "description": "Sessions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of sessions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "sessions": { - "type": "array", - "description": "List of sessions.", - "items": { "type": "object", "$ref": "#/definitions/session" }, - "x-example": "" - } - }, - "required": ["total", "sessions"] - }, - "logList": { - "description": "Logs List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of logs documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "logs": { - "type": "array", - "description": "List of logs.", - "items": { "type": "object", "$ref": "#/definitions/log" }, - "x-example": "" - } - }, - "required": ["total", "logs"] - }, - "fileList": { - "description": "Files List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of files documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "files": { - "type": "array", - "description": "List of files.", - "items": { "type": "object", "$ref": "#/definitions/file" }, - "x-example": "" - } - }, - "required": ["total", "files"] - }, - "bucketList": { - "description": "Buckets List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of buckets documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "buckets": { - "type": "array", - "description": "List of buckets.", - "items": { "type": "object", "$ref": "#/definitions/bucket" }, - "x-example": "" - } - }, - "required": ["total", "buckets"] - }, - "teamList": { - "description": "Teams List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of teams documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "teams": { - "type": "array", - "description": "List of teams.", - "items": { "type": "object", "$ref": "#/definitions/team" }, - "x-example": "" - } - }, - "required": ["total", "teams"] - }, - "membershipList": { - "description": "Memberships List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of memberships documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "memberships": { - "type": "array", - "description": "List of memberships.", - "items": { "type": "object", "$ref": "#/definitions/membership" }, - "x-example": "" - } - }, - "required": ["total", "memberships"] - }, - "functionList": { - "description": "Functions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of functions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "functions": { - "type": "array", - "description": "List of functions.", - "items": { "type": "object", "$ref": "#/definitions/function" }, - "x-example": "" - } - }, - "required": ["total", "functions"] - }, - "runtimeList": { - "description": "Runtimes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of runtimes documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "runtimes": { - "type": "array", - "description": "List of runtimes.", - "items": { "type": "object", "$ref": "#/definitions/runtime" }, - "x-example": "" - } - }, - "required": ["total", "runtimes"] - }, - "deploymentList": { - "description": "Deployments List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of deployments documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "deployments": { - "type": "array", - "description": "List of deployments.", - "items": { "type": "object", "$ref": "#/definitions/deployment" }, - "x-example": "" - } - }, - "required": ["total", "deployments"] - }, - "executionList": { - "description": "Executions List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of executions documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "executions": { - "type": "array", - "description": "List of executions.", - "items": { "type": "object", "$ref": "#/definitions/execution" }, - "x-example": "" - } - }, - "required": ["total", "executions"] - }, - "countryList": { - "description": "Countries List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of countries documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "countries": { - "type": "array", - "description": "List of countries.", - "items": { "type": "object", "$ref": "#/definitions/country" }, - "x-example": "" - } - }, - "required": ["total", "countries"] - }, - "continentList": { - "description": "Continents List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of continents documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "continents": { - "type": "array", - "description": "List of continents.", - "items": { "type": "object", "$ref": "#/definitions/continent" }, - "x-example": "" - } - }, - "required": ["total", "continents"] - }, - "languageList": { - "description": "Languages List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of languages documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "languages": { - "type": "array", - "description": "List of languages.", - "items": { "type": "object", "$ref": "#/definitions/language" }, - "x-example": "" - } - }, - "required": ["total", "languages"] - }, - "currencyList": { - "description": "Currencies List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of currencies documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "currencies": { - "type": "array", - "description": "List of currencies.", - "items": { "type": "object", "$ref": "#/definitions/currency" }, - "x-example": "" - } - }, - "required": ["total", "currencies"] - }, - "phoneList": { - "description": "Phones List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of phones documents that matched your query.", - "x-example": 5, - "format": "int32" - }, - "phones": { - "type": "array", - "description": "List of phones.", - "items": { "type": "object", "$ref": "#/definitions/phone" }, - "x-example": "" - } - }, - "required": ["total", "phones"] - }, - "collection": { - "description": "Collection", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Collection read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "Collection write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "Collection name.", - "x-example": "My Collection" - }, - "enabled": { - "type": "boolean", - "description": "Collection enabled.", - "x-example": false - }, - "permission": { - "type": "string", - "description": "Collection permission model. Possible values: `document` or `collection`", - "x-example": "document" - }, - "attributes": { - "type": "array", - "description": "Collection attributes.", - "items": { - "x-anyOf": [ - { "$ref": "#/definitions/attributeBoolean" }, - { "$ref": "#/definitions/attributeInteger" }, - { "$ref": "#/definitions/attributeFloat" }, - { "$ref": "#/definitions/attributeEmail" }, - { "$ref": "#/definitions/attributeEnum" }, - { "$ref": "#/definitions/attributeUrl" }, - { "$ref": "#/definitions/attributeIp" }, - { "$ref": "#/definitions/attributeString" } - ] - }, - "x-example": {} - }, - "indexes": { - "type": "array", - "description": "Collection indexes.", - "items": { "type": "object", "$ref": "#/definitions/index" }, - "x-example": {} - } - }, - "required": [ - "$id", - "$read", - "$write", - "name", - "enabled", - "permission", - "attributes", - "indexes" - ] - }, - "attributeList": { - "description": "Attributes List", - "type": "object", - "properties": { - "total": { - "type": "integer", - "description": "Total number of attributes in the given collection.", - "x-example": 5, - "format": "int32" - }, - "attributes": { - "type": "array", - "description": "List of attributes.", - "items": { - "x-anyOf": [ - { "$ref": "#/definitions/attributeBoolean" }, - { "$ref": "#/definitions/attributeInteger" }, - { "$ref": "#/definitions/attributeFloat" }, - { "$ref": "#/definitions/attributeEmail" }, - { "$ref": "#/definitions/attributeEnum" }, - { "$ref": "#/definitions/attributeUrl" }, - { "$ref": "#/definitions/attributeIp" }, - { "$ref": "#/definitions/attributeString" } - ] - }, - "x-example": "" - } - }, - "required": ["total", "attributes"] - }, - "attributeString": { - "description": "AttributeString", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "size": { - "type": "integer", - "description": "Attribute size.", - "x-example": 128, - "format": "int32" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "size"] - }, - "attributeInteger": { - "description": "AttributeInteger", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "min": { - "type": "integer", - "description": "Minimum value to enforce for new documents.", - "x-example": 1, - "format": "int32", - "x-nullable": true - }, - "max": { - "type": "integer", - "description": "Maximum value to enforce for new documents.", - "x-example": 10, - "format": "int32", - "x-nullable": true - }, - "default": { - "type": "integer", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 10, - "format": "int32", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required"] - }, - "attributeFloat": { - "description": "AttributeFloat", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "min": { - "type": "number", - "description": "Minimum value to enforce for new documents.", - "x-example": 1.5, - "format": "double", - "x-nullable": true - }, - "max": { - "type": "number", - "description": "Maximum value to enforce for new documents.", - "x-example": 10.5, - "format": "double", - "x-nullable": true - }, - "default": { - "type": "number", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": 2.5, - "format": "double", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required"] - }, - "attributeBoolean": { - "description": "AttributeBoolean", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "default": { - "type": "boolean", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": false, - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required"] - }, - "attributeEmail": { - "description": "AttributeEmail", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "email" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "default@example.com", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "format"] - }, - "attributeEnum": { - "description": "AttributeEnum", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "elements": { - "type": "array", - "description": "Array of elements in enumerated type.", - "items": { "type": "string" }, - "x-example": "element" - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "enum" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "element", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "elements", "format"] - }, - "attributeIp": { - "description": "AttributeIP", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "ip" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "192.0.2.0", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "format"] - }, - "attributeUrl": { - "description": "AttributeURL", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Attribute Key.", - "x-example": "fullName" - }, - "type": { - "type": "string", - "description": "Attribute type.", - "x-example": "string" - }, - "status": { - "type": "string", - "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "required": { - "type": "boolean", - "description": "Is attribute required?", - "x-example": true - }, - "array": { - "type": "boolean", - "description": "Is attribute an array?", - "x-example": false, - "x-nullable": true - }, - "format": { - "type": "string", - "description": "String format.", - "x-example": "url" - }, - "default": { - "type": "string", - "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", - "x-example": "http://example.com", - "x-nullable": true - } - }, - "required": ["key", "type", "status", "required", "format"] - }, - "index": { - "description": "Index", - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Index Key.", - "x-example": "index1" - }, - "type": { - "type": "string", - "description": "Index type.", - "x-example": "primary" - }, - "status": { - "type": "string", - "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" - }, - "attributes": { - "type": "array", - "description": "Index attributes.", - "items": { "type": "string" }, - "x-example": [] - }, - "orders": { - "type": "array", - "description": "Index orders.", - "items": { "type": "string" }, - "x-example": [] - } - }, - "required": ["key", "type", "status", "attributes", "orders"] - }, - "document": { - "description": "Document", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Document ID.", - "x-example": "5e5ea5c16897e" - }, - "$collection": { - "type": "string", - "description": "Collection ID.", - "x-example": "5e5ea5c15117e" - }, - "$read": { - "type": "array", - "description": "Document read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "Document write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - } - }, - "additionalProperties": true, - "required": ["$id", "$collection", "$read", "$write"] - }, - "log": { - "description": "Log", - "type": "object", - "properties": { - "event": { - "type": "string", - "description": "Event name.", - "x-example": "account.sessions.create" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "610fc2f985ee0" - }, - "userEmail": { - "type": "string", - "description": "User Email.", - "x-example": "john@appwrite.io" - }, - "userName": { - "type": "string", - "description": "User Name.", - "x-example": "John Doe" - }, - "mode": { - "type": "string", - "description": "API mode when event triggered.", - "x-example": "admin" - }, - "ip": { - "type": "string", - "description": "IP session in use when the session was created.", - "x-example": "127.0.0.1" - }, - "time": { - "type": "integer", - "description": "Log creation time in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": [ - "event", - "userId", - "userEmail", - "userName", - "mode", - "ip", - "time", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName" - ] - }, - "user": { - "description": "User", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "John Doe" - }, - "registration": { - "type": "integer", - "description": "User registration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "status": { - "type": "boolean", - "description": "User status. Pass `true` for enabled and `false` for disabled.", - "x-example": true - }, - "passwordUpdate": { - "type": "integer", - "description": "Unix timestamp of the most recent password update", - "x-example": 1592981250, - "format": "int32" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "emailVerification": { - "type": "boolean", - "description": "Email verification status.", - "x-example": true - }, - "prefs": { - "type": "object", - "description": "User preferences as a key-value object", - "x-example": { "theme": "pink", "timezone": "UTC" }, - "items": { "type": "object", "$ref": "#/definitions/preferences" } - } - }, - "required": [ - "$id", - "name", - "registration", - "status", - "passwordUpdate", - "email", - "emailVerification", - "prefs" - ] - }, - "preferences": { - "description": "Preferences", - "type": "object", - "additionalProperties": true - }, - "session": { - "description": "Session", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Session ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5bb8c16897e" - }, - "expire": { - "type": "integer", - "description": "Session expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "provider": { - "type": "string", - "description": "Session Provider.", - "x-example": "email" - }, - "providerUid": { - "type": "string", - "description": "Session Provider User ID.", - "x-example": "user@example.com" - }, - "providerAccessToken": { - "type": "string", - "description": "Session Provider Access Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "providerAccessTokenExpiry": { - "type": "integer", - "description": "Date, the Unix timestamp of when the access token expires.", - "x-example": 1592981250, - "format": "int32" - }, - "providerRefreshToken": { - "type": "string", - "description": "Session Provider Refresh Token.", - "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" - }, - "ip": { - "type": "string", - "description": "IP in use when the session was created.", - "x-example": "127.0.0.1" - }, - "osCode": { - "type": "string", - "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", - "x-example": "Mac" - }, - "osName": { - "type": "string", - "description": "Operating system name.", - "x-example": "Mac" - }, - "osVersion": { - "type": "string", - "description": "Operating system version.", - "x-example": "Mac" - }, - "clientType": { - "type": "string", - "description": "Client type.", - "x-example": "browser" - }, - "clientCode": { - "type": "string", - "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", - "x-example": "CM" - }, - "clientName": { - "type": "string", - "description": "Client name.", - "x-example": "Chrome Mobile iOS" - }, - "clientVersion": { - "type": "string", - "description": "Client version.", - "x-example": "84.0" - }, - "clientEngine": { - "type": "string", - "description": "Client engine name.", - "x-example": "WebKit" - }, - "clientEngineVersion": { - "type": "string", - "description": "Client engine name.", - "x-example": "605.1.15" - }, - "deviceName": { - "type": "string", - "description": "Device name.", - "x-example": "smartphone" - }, - "deviceBrand": { - "type": "string", - "description": "Device brand name.", - "x-example": "Google" - }, - "deviceModel": { - "type": "string", - "description": "Device model name.", - "x-example": "Nexus 5" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "current": { - "type": "boolean", - "description": "Returns true if this the current user session.", - "x-example": true - } - }, - "required": [ - "$id", - "userId", - "expire", - "provider", - "providerUid", - "providerAccessToken", - "providerAccessTokenExpiry", - "providerRefreshToken", - "ip", - "osCode", - "osName", - "osVersion", - "clientType", - "clientCode", - "clientName", - "clientVersion", - "clientEngine", - "clientEngineVersion", - "deviceName", - "deviceBrand", - "deviceModel", - "countryCode", - "countryName", - "current" - ] - }, - "token": { - "description": "Token", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Token ID.", - "x-example": "bb8ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c168bb8" - }, - "secret": { - "type": "string", - "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", - "x-example": "" - }, - "expire": { - "type": "integer", - "description": "Token expiration date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - } - }, - "required": ["$id", "userId", "secret", "expire"] - }, - "locale": { - "description": "Locale", - "type": "object", - "properties": { - "ip": { - "type": "string", - "description": "User IP address.", - "x-example": "127.0.0.1" - }, - "countryCode": { - "type": "string", - "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format", - "x-example": "US" - }, - "country": { - "type": "string", - "description": "Country name. This field support localization.", - "x-example": "United States" - }, - "continentCode": { - "type": "string", - "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", - "x-example": "NA" - }, - "continent": { - "type": "string", - "description": "Continent name. This field support localization.", - "x-example": "North America" - }, - "eu": { - "type": "boolean", - "description": "True if country is part of the Europian Union.", - "x-example": false - }, - "currency": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format", - "x-example": "USD" - } - }, - "required": [ - "ip", - "countryCode", - "country", - "continentCode", - "continent", - "eu", - "currency" - ] - }, - "file": { - "description": "File", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "File ID.", - "x-example": "5e5ea5c16897e" - }, - "bucketId": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": "user:608f9da25e7e1" - }, - "name": { - "type": "string", - "description": "File name.", - "x-example": "Pink.png" - }, - "dateCreated": { - "type": "integer", - "description": "File creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "signature": { - "type": "string", - "description": "File MD5 signature.", - "x-example": "5d529fd02b544198ae075bd57c1762bb" - }, - "mimeType": { - "type": "string", - "description": "File mime type.", - "x-example": "image/png" - }, - "sizeOriginal": { - "type": "integer", - "description": "File original size in bytes.", - "x-example": 17890, - "format": "int32" - }, - "chunksTotal": { - "type": "integer", - "description": "Total number of chunks available", - "x-example": 17890, - "format": "int32" - }, - "chunksUploaded": { - "type": "integer", - "description": "Total number of chunks uploaded", - "x-example": 17890, - "format": "int32" - } - }, - "required": [ - "$id", - "bucketId", - "$read", - "$write", - "name", - "dateCreated", - "signature", - "mimeType", - "sizeOriginal", - "chunksTotal", - "chunksUploaded" - ] - }, - "bucket": { - "description": "Bucket", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Bucket ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "File read permissions.", - "items": { "type": "string" }, - "x-example": ["role:all"] - }, - "$write": { - "type": "array", - "description": "File write permissions.", - "items": { "type": "string" }, - "x-example": ["user:608f9da25e7e1"] - }, - "permission": { - "type": "string", - "description": "Bucket permission model. Possible values: `bucket` or `file`", - "x-example": "file" - }, - "dateCreated": { - "type": "integer", - "description": "Bucket creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Bucket update date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "name": { - "type": "string", - "description": "Bucket name.", - "x-example": "Documents" - }, - "enabled": { - "type": "boolean", - "description": "Bucket enabled.", - "x-example": false - }, - "maximumFileSize": { - "type": "integer", - "description": "Maximum file size supported.", - "x-example": 100, - "format": "int32" - }, - "allowedFileExtensions": { - "type": "array", - "description": "Allowed file extensions.", - "items": { "type": "string" }, - "x-example": ["jpg", "png"] - }, - "encryption": { - "type": "boolean", - "description": "Bucket is encrypted.", - "x-example": false - }, - "antivirus": { - "type": "boolean", - "description": "Virus scanning is enabled.", - "x-example": false - } - }, - "required": [ - "$id", - "$read", - "$write", - "permission", - "dateCreated", - "dateUpdated", - "name", - "enabled", - "maximumFileSize", - "allowedFileExtensions", - "encryption", - "antivirus" - ] - }, - "team": { - "description": "Team", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "Team name.", - "x-example": "VIP" - }, - "dateCreated": { - "type": "integer", - "description": "Team creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "total": { - "type": "integer", - "description": "Total number of team members.", - "x-example": 7, - "format": "int32" - } - }, - "required": ["$id", "name", "dateCreated", "total"] - }, - "membership": { - "description": "Membership", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Membership ID.", - "x-example": "5e5ea5c16897e" - }, - "userId": { - "type": "string", - "description": "User ID.", - "x-example": "5e5ea5c16897e" - }, - "teamId": { - "type": "string", - "description": "Team ID.", - "x-example": "5e5ea5c16897e" - }, - "name": { - "type": "string", - "description": "User name.", - "x-example": "VIP" - }, - "email": { - "type": "string", - "description": "User email address.", - "x-example": "john@appwrite.io" - }, - "invited": { - "type": "integer", - "description": "Date, the user has been invited to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "joined": { - "type": "integer", - "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "confirm": { - "type": "boolean", - "description": "User confirmation status, true if the user has joined the team or false otherwise.", - "x-example": false - }, - "roles": { - "type": "array", - "description": "User list of roles", - "items": { "type": "string" }, - "x-example": "admin" - } - }, - "required": [ - "$id", - "userId", - "teamId", - "name", - "email", - "invited", - "joined", - "confirm", - "roles" - ] - }, - "function": { - "description": "Function", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea5c16897e" - }, - "execute": { - "type": "array", - "description": "Execution permissions.", - "items": { "type": "string" }, - "x-example": "role:member" - }, - "name": { - "type": "string", - "description": "Function name.", - "x-example": "My Function" - }, - "dateCreated": { - "type": "integer", - "description": "Function creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "dateUpdated": { - "type": "integer", - "description": "Function update date in Unix timestamp.", - "x-example": 1592981257, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Function status. Possible values: `disabled`, `enabled`", - "x-example": "enabled" - }, - "runtime": { - "type": "string", - "description": "Function execution runtime.", - "x-example": "python-3.8" - }, - "deployment": { - "type": "string", - "description": "Function's active deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "vars": { - "type": "object", - "additionalProperties": true, - "description": "Function environment variables.", - "x-example": { "key": "value" } - }, - "events": { - "type": "array", - "description": "Function trigger events.", - "items": { "type": "string" }, - "x-example": "account.create" - }, - "schedule": { - "type": "string", - "description": "Function execution schedult in CRON format.", - "x-example": "5 4 * * *" - }, - "scheduleNext": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981292, - "format": "int32" - }, - "schedulePrevious": { - "type": "integer", - "description": "Function next scheduled execution date in Unix timestamp.", - "x-example": 1592981237, - "format": "int32" - }, - "timeout": { - "type": "integer", - "description": "Function execution timeout in seconds.", - "x-example": 1592981237, - "format": "int32" - } - }, - "required": [ - "$id", - "execute", - "name", - "dateCreated", - "dateUpdated", - "status", - "runtime", - "deployment", - "vars", - "events", - "schedule", - "scheduleNext", - "schedulePrevious", - "timeout" - ] - }, - "runtime": { - "description": "Runtime", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Runtime ID.", - "x-example": "python-3.8" - }, - "name": { - "type": "string", - "description": "Runtime Name.", - "x-example": "Python" - }, - "version": { - "type": "string", - "description": "Runtime version.", - "x-example": "3.8" - }, - "base": { - "type": "string", - "description": "Base Docker image used to build the runtime.", - "x-example": "python:3.8-alpine" - }, - "image": { - "type": "string", - "description": "Image name of Docker Hub.", - "x-example": "appwrite\\/runtime-for-python:3.8" - }, - "logo": { - "type": "string", - "description": "Name of the logo image.", - "x-example": "python.png" - }, - "supports": { - "type": "array", - "description": "List of supported architectures.", - "items": { "type": "string" }, - "x-example": "amd64" - } - }, - "required": [ - "$id", - "name", - "version", - "base", - "image", - "logo", - "supports" - ] - }, - "deployment": { - "description": "Deployment", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Deployment ID.", - "x-example": "5e5ea5c16897e" - }, - "resourceId": { - "type": "string", - "description": "Resource ID.", - "x-example": "5e5ea6g16897e" - }, - "resourceType": { - "type": "string", - "description": "Resource type.", - "x-example": "functions" - }, - "dateCreated": { - "type": "integer", - "description": "The deployment creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "entrypoint": { - "type": "string", - "description": "The entrypoint file to use to execute the deployment code.", - "x-example": "enabled" - }, - "size": { - "type": "integer", - "description": "The code size in bytes.", - "x-example": 128, - "format": "int32" - }, - "buildId": { - "type": "string", - "description": "The current build ID.", - "x-example": "5e5ea5c16897e" - }, - "activate": { - "type": "boolean", - "description": "Whether the deployment should be automatically activated.", - "x-example": true - }, - "status": { - "type": "string", - "description": "The deployment status.", - "x-example": "enabled" - }, - "buildStdout": { - "type": "string", - "description": "The build stdout.", - "x-example": "enabled" - }, - "buildStderr": { - "type": "string", - "description": "The build stderr.", - "x-example": "enabled" - } - }, - "required": [ - "$id", - "resourceId", - "resourceType", - "dateCreated", - "entrypoint", - "size", - "buildId", - "activate", - "status", - "buildStdout", - "buildStderr" - ] - }, - "execution": { - "description": "Execution", - "type": "object", - "properties": { - "$id": { - "type": "string", - "description": "Execution ID.", - "x-example": "5e5ea5c16897e" - }, - "$read": { - "type": "array", - "description": "Execution read permissions.", - "items": { "type": "string" }, - "x-example": "role:all" - }, - "functionId": { - "type": "string", - "description": "Function ID.", - "x-example": "5e5ea6g16897e" - }, - "dateCreated": { - "type": "integer", - "description": "The execution creation date in Unix timestamp.", - "x-example": 1592981250, - "format": "int32" - }, - "trigger": { - "type": "string", - "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" - }, - "status": { - "type": "string", - "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" - }, - "statusCode": { - "type": "integer", - "description": "The script status code.", - "x-example": 0, - "format": "int32" - }, - "stdout": { - "type": "string", - "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", - "x-example": "" - }, - "stderr": { - "type": "string", - "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", - "x-example": "" - }, - "time": { - "type": "number", - "description": "The script execution time in seconds.", - "x-example": 0.4, - "format": "double" - } - }, - "required": [ - "$id", - "$read", - "functionId", - "dateCreated", - "trigger", - "status", - "statusCode", - "stdout", - "stderr", - "time" - ] - }, - "country": { - "description": "Country", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - }, - "code": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - } - }, - "required": ["name", "code"] - }, - "continent": { - "description": "Continent", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Continent name.", - "x-example": "Europe" - }, - "code": { - "type": "string", - "description": "Continent two letter code.", - "x-example": "EU" - } - }, - "required": ["name", "code"] - }, - "language": { - "description": "Language", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Language name.", - "x-example": "Italian" - }, - "code": { - "type": "string", - "description": "Language two-character ISO 639-1 codes.", - "x-example": "it" - }, - "nativeName": { - "type": "string", - "description": "Language native name.", - "x-example": "Italiano" - } - }, - "required": ["name", "code", "nativeName"] - }, - "currency": { - "description": "Currency", - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Currency symbol.", - "x-example": "$" - }, - "name": { - "type": "string", - "description": "Currency name.", - "x-example": "US dollar" - }, - "symbolNative": { - "type": "string", - "description": "Currency native symbol.", - "x-example": "$" - }, - "decimalDigits": { - "type": "integer", - "description": "Number of decimal digits.", - "x-example": 2, - "format": "int32" - }, - "rounding": { - "type": "number", - "description": "Currency digit rounding.", - "x-example": 0, - "format": "double" - }, - "code": { - "type": "string", - "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", - "x-example": "USD" - }, - "namePlural": { - "type": "string", - "description": "Currency plural name", - "x-example": "US dollars" - } - }, - "required": [ - "symbol", - "name", - "symbolNative", - "decimalDigits", - "rounding", - "code", - "namePlural" - ] - }, - "phone": { - "description": "Phone", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Phone code.", - "x-example": "+1" - }, - "countryCode": { - "type": "string", - "description": "Country two-character ISO 3166-1 alpha code.", - "x-example": "US" - }, - "countryName": { - "type": "string", - "description": "Country name.", - "x-example": "United States" - } - }, - "required": ["code", "countryCode", "countryName"] - }, - "healthAntivirus": { - "description": "Health Antivirus", - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "Antivirus version.", - "x-example": "1.0.0" - }, - "status": { - "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" - } - }, - "required": ["version", "status"] - }, - "healthQueue": { - "description": "Health Queue", - "type": "object", - "properties": { - "size": { - "type": "integer", - "description": "Amount of actions in the queue.", - "x-example": 8, - "format": "int32" - } - }, - "required": ["size"] - }, - "healthStatus": { - "description": "Health Status", - "type": "object", - "properties": { - "ping": { - "type": "integer", - "description": "Duration in milliseconds how long the health check took.", - "x-example": 128, - "format": "int32" - }, - "status": { - "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" - } - }, - "required": ["ping", "status"] - }, - "healthTime": { - "description": "Health Time", - "type": "object", - "properties": { - "remoteTime": { - "type": "integer", - "description": "Current unix timestamp on trustful remote server.", - "x-example": 1639490751, - "format": "int32" - }, - "localTime": { - "type": "integer", - "description": "Current unix timestamp of local server where Appwrite runs.", - "x-example": 1639490844, - "format": "int32" - }, - "diff": { - "type": "integer", - "description": "Difference of unix remote and local timestamps in milliseconds.", - "x-example": 93, - "format": "int32" - } - }, - "required": ["remoteTime", "localTime", "diff"] - } - }, - "externalDocs": { - "description": "Full API docs, specs and tutorials", - "url": "https://appwrite.io/docs" - } -} +{"swagger":"2.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}]}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","default":null,"x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","default":null,"x-example":1},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","default":15,"x-example":1}},"required":["name","execute"]}}]},"delete":{"summary":"Delete Function","operationId":"functionsDelete","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":30000000,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["bucketId","name","permission"]}}]}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":null,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","required":true,"x-upload-id":true,"type":"string","x-example":"[FILE_ID]","in":"formData"},{"name":"file","description":"Binary file.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":["owner"],"x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["email","roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"definitions":{"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 7f35cbd379..e908e573c5 100644 --- a/composer.lock +++ b/composer.lock @@ -6584,5 +6584,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/docker-compose.yml b/docker-compose.yml index 1ed63bd6f3..f07b3fe358 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,8 @@ x-logging: &x-logging logging: driver: 'json-file' options: - max-file: 5 - max-size: 10m + max-file: '5' + max-size: '10m' version: '3' From 23342fe926be5b7245d1c054f6e76bc6ba277ea9 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 13 Apr 2022 11:59:17 +0300 Subject: [PATCH 63/73] feat: format spec --- app/config/specs/swagger2-latest-client.json | 4849 +++++- app/config/specs/swagger2-latest-console.json | 13011 +++++++++++++++- app/config/specs/swagger2-latest-server.json | 9049 ++++++++++- 3 files changed, 26906 insertions(+), 3 deletions(-) diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index cdf7726ac0..076683e6d0 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1 +1,4848 @@ -{"swagger":"2.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","required":true,"x-upload-id":true,"type":"string","x-example":"[FILE_ID]","in":"formData"},{"name":"file","description":"Binary file.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":["owner"],"x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["email","roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"definitions":{"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{ + "swagger": "2.0", + "info": { + "version": "0.13.4", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", + "termsOfService": "https://appwrite.io/policy/terms", + "contact": { + "name": "Appwrite Team", + "url": "https://appwrite.io/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" + } + }, + "host": "HOSTNAME", + "basePath": "/v1", + "schemes": ["https"], + "consumes": ["application/json", "multipart/form-data"], + "produces": ["application/json"], + "securityDefinitions": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { "demo": "5df5acd0d48c2" } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { "demo": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..." } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { "demo": "en" } + } + }, + "paths": { + "/account": { + "get": { + "summary": "Get Account", + "operationId": "accountGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user data as JSON object.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "post": { + "summary": "Create Account", + "operationId": "accountCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](/docs/client/account#accountCreateSession).", + "responses": { + "201": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[USER_ID]" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "[NAME]" + } + }, + "required": ["userId", "email", "password"] + } + } + ] + }, + "delete": { + "summary": "Delete Account", + "operationId": "accountDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 56, + "cookies": false, + "type": "", + "demo": "account/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/account/email": { + "patch": { + "summary": "Update Account Email", + "operationId": "accountUpdateEmail", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 54, + "cookies": false, + "type": "", + "demo": "account/update-email.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["email", "password"] + } + } + ] + } + }, + "/account/jwt": { + "post": { + "summary": "Create Account JWT", + "operationId": "accountCreateJWT", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "schema": { "$ref": "#/definitions/jwt" } + } + }, + "x-appwrite": { + "method": "createJWT", + "weight": 46, + "cookies": false, + "type": "", + "demo": "account/create-j-w-t.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-jwt.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }] + } + }, + "/account/logs": { + "get": { + "summary": "Get Account Logs", + "operationId": "accountGetLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "schema": { "$ref": "#/definitions/logList" } + } + }, + "x-appwrite": { + "method": "getLogs", + "weight": 50, + "cookies": false, + "type": "", + "demo": "account/get-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "limit", + "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "/account/name": { + "patch": { + "summary": "Update Account Name", + "operationId": "accountUpdateName", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 52, + "cookies": false, + "type": "", + "demo": "account/update-name.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + } + }, + "/account/password": { + "patch": { + "summary": "Update Account Password", + "operationId": "accountUpdatePassword", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePassword", + "weight": 53, + "cookies": false, + "type": "", + "demo": "account/update-password.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password" + } + }, + "required": ["password"] + } + } + ] + } + }, + "/account/prefs": { + "get": { + "summary": "Get Account Preferences", + "operationId": "accountGetPrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user preferences as a key-value object.", + "responses": { + "200": { + "description": "Preferences", + "schema": { "$ref": "#/definitions/preferences" } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account/get-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "patch": { + "summary": "Update Account Preferences", + "operationId": "accountUpdatePrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 55, + "cookies": false, + "type": "", + "demo": "account/update-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": ["prefs"] + } + } + ] + } + }, + "/account/recovery": { + "post": { + "summary": "Create Password Recovery", + "operationId": "accountCreateRecovery", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createRecovery", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account/create-recovery.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": ["url:{url},email:{param-email}", "ip:{ip}"], + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + } + }, + "required": ["email", "url"] + } + } + ] + }, + "put": { + "summary": "Create Password Recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "updateRecovery", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account/update-recovery.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "default": null, + "x-example": "[SECRET]" + }, + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "passwordAgain": { + "type": "string", + "description": "Repeat new user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["userId", "secret", "password", "passwordAgain"] + } + } + ] + } + }, + "/account/sessions": { + "get": { + "summary": "Get Account Sessions", + "operationId": "accountGetSessions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user list of active sessions across different devices.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { "$ref": "#/definitions/sessionList" } + } + }, + "x-appwrite": { + "method": "getSessions", + "weight": 49, + "cookies": false, + "type": "", + "demo": "account/get-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "post": { + "summary": "Create Account Session", + "operationId": "accountCreateSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.", + "responses": { + "201": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account/create-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["email", "password"] + } + } + ] + }, + "delete": { + "summary": "Delete All Account Sessions", + "operationId": "accountDeleteSessions", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSessions", + "weight": 59, + "cookies": false, + "type": "", + "demo": "account/delete-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/account/sessions/anonymous": { + "post": { + "summary": "Create Anonymous Session", + "operationId": "accountCreateAnonymousSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](/docs/client/account#accountUpdateEmail) or create an [OAuth2 session](/docs/client/account#accountCreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "createAnonymousSession", + "weight": 45, + "cookies": false, + "type": "", + "demo": "account/create-anonymous-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-anonymous.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }] + } + }, + "/account/sessions/magic-url": { + "post": { + "summary": "Create Magic URL session", + "operationId": "accountCreateMagicURLSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT /account/sessions/magic-url](/docs/client/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createMagicURLSession", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account/create-magic-u-r-l-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[USER_ID]" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https://example.com" + } + }, + "required": ["userId", "email"] + } + } + ] + }, + "put": { + "summary": "Create Magic URL session (confirmation)", + "operationId": "accountUpdateMagicURLSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](/docs/client/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "updateMagicURLSession", + "weight": 44, + "cookies": false, + "type": "", + "demo": "account/update-magic-u-r-l-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + }, + "/account/sessions/oauth2/{provider}": { + "get": { + "summary": "Create Account Session with OAuth2", + "operationId": "accountCreateOAuth2Session", + "consumes": ["application/json"], + "produces": ["text/html"], + "tags": ["account"], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n", + "responses": { "301": { "description": "No content" } }, + "x-appwrite": { + "method": "createOAuth2Session", + "weight": 39, + "cookies": false, + "type": "webAuth", + "demo": "account/create-o-auth2session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-oauth2.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.", + "required": true, + "type": "string", + "x-example": "amazon", + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "default": "", + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "default": "", + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + } + ] + } + }, + "/account/sessions/{sessionId}": { + "get": { + "summary": "Get Session By ID", + "operationId": "accountGetSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "getSession", + "weight": 51, + "cookies": false, + "type": "", + "demo": "account/get-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Session (Refresh Tokens)", + "operationId": "accountUpdateSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "updateSession", + "weight": 58, + "cookies": false, + "type": "", + "demo": "account/update-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Account Session", + "operationId": "accountDeleteSession", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSession", + "weight": 57, + "cookies": false, + "type": "", + "demo": "account/delete-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + } + }, + "/account/verification": { + "post": { + "summary": "Create Email Verification", + "operationId": "accountCreateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createVerification", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account/create-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + } + }, + "required": ["url"] + } + } + ] + }, + "put": { + "summary": "Create Email Verification (confirmation)", + "operationId": "accountUpdateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "updateVerification", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account/update-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + }, + "/avatars/browsers/{code}": { + "get": { + "summary": "Get Browser Icon", + "operationId": "avatarsGetBrowser", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getBrowser", + "weight": 65, + "cookies": false, + "type": "location", + "demo": "avatars/get-browser.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "type": "string", + "x-example": "aa", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/credit-cards/{code}": { + "get": { + "summary": "Get Credit Card Icon", + "operationId": "avatarsGetCreditCard", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getCreditCard", + "weight": 64, + "cookies": false, + "type": "location", + "demo": "avatars/get-credit-card.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", + "required": true, + "type": "string", + "x-example": "amex", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/favicon": { + "get": { + "summary": "Get Favicon", + "operationId": "avatarsGetFavicon", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["avatars"], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFavicon", + "weight": 68, + "cookies": false, + "type": "location", + "demo": "avatars/get-favicon.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "in": "query" + } + ] + } + }, + "/avatars/flags/{code}": { + "get": { + "summary": "Get Country Flag", + "operationId": "avatarsGetFlag", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFlag", + "weight": 66, + "cookies": false, + "type": "location", + "demo": "avatars/get-flag.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "type": "string", + "x-example": "af", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/image": { + "get": { + "summary": "Get Image from URL", + "operationId": "avatarsGetImage", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["avatars"], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getImage", + "weight": 67, + "cookies": false, + "type": "location", + "demo": "avatars/get-image.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + } + ] + } + }, + "/avatars/initials": { + "get": { + "summary": "Get User Initials", + "operationId": "avatarsGetInitials", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getInitials", + "weight": 70, + "cookies": false, + "type": "location", + "demo": "avatars/get-initials.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "type": "string", + "x-example": "[NAME]", + "default": "", + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "color", + "description": "Changes text color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + } + ] + } + }, + "/avatars/qr": { + "get": { + "summary": "Get QR Code", + "operationId": "avatarsGetQR", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getQR", + "weight": 69, + "cookies": false, + "type": "location", + "demo": "avatars/get-q-r.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "type": "string", + "x-example": "[TEXT]", + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 0 to 1000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "query" + } + ] + } + }, + "/database/collections/{collectionId}/documents": { + "get": { + "summary": "List Documents", + "operationId": "databaseListDocuments", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Documents List", + "schema": { "$ref": "#/definitions/documentList" } + } + }, + "x-appwrite": { + "method": "listDocuments", + "weight": 95, + "cookies": false, + "type": "", + "demo": "database/list-documents.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderAttributes", + "description": "Array of attributes used to sort results.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + }, + { + "name": "orderTypes", + "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create Document", + "operationId": "databaseCreateDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "createDocument", + "weight": 94, + "cookies": false, + "type": "", + "demo": "database/create-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[DOCUMENT_ID]" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{}" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": ["documentId", "data"] + } + } + ] + } + }, + "/database/collections/{collectionId}/documents/{documentId}": { + "get": { + "summary": "Get Document", + "operationId": "databaseGetDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "getDocument", + "weight": 96, + "cookies": false, + "type": "", + "demo": "database/get-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Document", + "operationId": "databaseUpdateDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "updateDocument", + "weight": 98, + "cookies": false, + "type": "", + "demo": "database/update-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": {}, + "x-example": "{}" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": ["data"] + } + } + ] + }, + "delete": { + "summary": "Delete Document", + "operationId": "databaseDeleteDocument", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "Delete a document by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteDocument", + "weight": 99, + "cookies": false, + "type": "", + "demo": "database/delete-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}": { + "post": { + "summary": "Retry Build", + "operationId": "functionsRetryBuild", + "consumes": ["application/json"], + "produces": [], + "tags": ["functions"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "retryBuild", + "weight": 207, + "cookies": false, + "type": "", + "demo": "functions/retry-build.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/retry-build.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + }, + { + "name": "buildId", + "description": "Build unique ID.", + "required": true, + "type": "string", + "x-example": "[BUILD_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/executions": { + "get": { + "summary": "List Executions", + "operationId": "functionsListExecutions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Executions List", + "schema": { "$ref": "#/definitions/executionList" } + } + }, + "x-appwrite": { + "method": "listExecutions", + "weight": 205, + "cookies": false, + "type": "", + "demo": "functions/list-executions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Execution", + "operationId": "functionsCreateExecution", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "schema": { "$ref": "#/definitions/execution" } + } + }, + "x-appwrite": { + "method": "createExecution", + "weight": 204, + "cookies": false, + "type": "", + "demo": "functions/create-execution.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "String of custom data to send to function.", + "default": "", + "x-example": "[DATA]" + }, + "async": { + "type": "boolean", + "description": "Execute code asynchronously. Default value is true.", + "default": true, + "x-example": false + } + } + } + } + ] + } + }, + "/functions/{functionId}/executions/{executionId}": { + "get": { + "summary": "Get Execution", + "operationId": "functionsGetExecution", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { "$ref": "#/definitions/execution" } + } + }, + "x-appwrite": { + "method": "getExecution", + "weight": 206, + "cookies": false, + "type": "", + "demo": "functions/get-execution.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "[EXECUTION_ID]", + "in": "path" + } + ] + } + }, + "/locale": { + "get": { + "summary": "Get User Locale", + "operationId": "localeGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "schema": { "$ref": "#/definitions/locale" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 100, + "cookies": false, + "type": "", + "demo": "locale/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-locale.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/locale/continents": { + "get": { + "summary": "List Continents", + "operationId": "localeGetContinents", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "schema": { "$ref": "#/definitions/continentList" } + } + }, + "x-appwrite": { + "method": "getContinents", + "weight": 104, + "cookies": false, + "type": "", + "demo": "locale/get-continents.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/locale/countries": { + "get": { + "summary": "List Countries", + "operationId": "localeGetCountries", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { "$ref": "#/definitions/countryList" } + } + }, + "x-appwrite": { + "method": "getCountries", + "weight": 101, + "cookies": false, + "type": "", + "demo": "locale/get-countries.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/locale/countries/eu": { + "get": { + "summary": "List EU Countries", + "operationId": "localeGetCountriesEU", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { "$ref": "#/definitions/countryList" } + } + }, + "x-appwrite": { + "method": "getCountriesEU", + "weight": 102, + "cookies": false, + "type": "", + "demo": "locale/get-countries-e-u.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/locale/countries/phones": { + "get": { + "summary": "List Countries Phone Codes", + "operationId": "localeGetCountriesPhones", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "schema": { "$ref": "#/definitions/phoneList" } + } + }, + "x-appwrite": { + "method": "getCountriesPhones", + "weight": 103, + "cookies": false, + "type": "", + "demo": "locale/get-countries-phones.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/locale/currencies": { + "get": { + "summary": "List Currencies", + "operationId": "localeGetCurrencies", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "schema": { "$ref": "#/definitions/currencyList" } + } + }, + "x-appwrite": { + "method": "getCurrencies", + "weight": 105, + "cookies": false, + "type": "", + "demo": "locale/get-currencies.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/locale/languages": { + "get": { + "summary": "List Languages", + "operationId": "localeGetLanguages", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "schema": { "$ref": "#/definitions/languageList" } + } + }, + "x-appwrite": { + "method": "getLanguages", + "weight": 106, + "cookies": false, + "type": "", + "demo": "locale/get-languages.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/storage/buckets/{bucketId}/files": { + "get": { + "summary": "List Files", + "operationId": "storageListFiles", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Files List", + "schema": { "$ref": "#/definitions/fileList" } + } + }, + "x-appwrite": { + "method": "listFiles", + "weight": 156, + "cookies": false, + "type": "", + "demo": "storage/list-files.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create File", + "operationId": "storageCreateFile", + "consumes": ["multipart/form-data"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "createFile", + "weight": 155, + "cookies": false, + "type": "upload", + "demo": "storage/create-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "x-upload-id": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "formData" + }, + { + "name": "file", + "description": "Binary file.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "read", + "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "x-example": "[\"role:all\"]", + "in": "formData" + }, + { + "name": "write", + "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "x-example": "[\"role:all\"]", + "in": "formData" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}": { + "get": { + "summary": "Get File", + "operationId": "storageGetFile", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "getFile", + "weight": 157, + "cookies": false, + "type": "", + "demo": "storage/get-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update File", + "operationId": "storageUpdateFile", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "updateFile", + "weight": 161, + "cookies": false, + "type": "", + "demo": "storage/update-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete File", + "operationId": "storageDeleteFile", + "consumes": ["application/json"], + "produces": [], + "tags": ["storage"], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteFile", + "weight": 162, + "cookies": false, + "type": "", + "demo": "storage/delete-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/download": { + "get": { + "summary": "Get File for Download", + "operationId": "storageGetFileDownload", + "consumes": ["application/json"], + "produces": ["*/*"], + "tags": ["storage"], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { "description": "File", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFileDownload", + "weight": 159, + "cookies": false, + "type": "location", + "demo": "storage/get-file-download.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/preview": { + "get": { + "summary": "Get File Preview", + "operationId": "storageGetFilePreview", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["storage"], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFilePreview", + "weight": 158, + "cookies": false, + "type": "location", + "demo": "storage/get-file-preview.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "type": "string", + "x-example": "center", + "default": "center", + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpg", + "default": "", + "in": "query" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/view": { + "get": { + "summary": "Get File for View", + "operationId": "storageGetFileView", + "consumes": ["application/json"], + "produces": ["*/*"], + "tags": ["storage"], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { "description": "File", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFileView", + "weight": 160, + "cookies": false, + "type": "location", + "demo": "storage/get-file-view.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/teams": { + "get": { + "summary": "List Teams", + "operationId": "teamsList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Teams List", + "schema": { "$ref": "#/definitions/teamList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 166, + "cookies": false, + "type": "", + "demo": "teams/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-teams.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Team", + "operationId": "teamsCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 165, + "cookies": false, + "type": "", + "demo": "teams/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[TEAM_ID]" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", + "default": ["owner"], + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["teamId", "name"] + } + } + ] + } + }, + "/teams/{teamId}": { + "get": { + "summary": "Get Team", + "operationId": "teamsGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 167, + "cookies": false, + "type": "", + "demo": "teams/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Team", + "operationId": "teamsUpdate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Update a team using its ID. Only members with the owner role can update the team.", + "responses": { + "200": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "update", + "weight": 168, + "cookies": false, + "type": "", + "demo": "teams/update.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + }, + "delete": { + "summary": "Delete Team", + "operationId": "teamsDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["teams"], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 169, + "cookies": false, + "type": "", + "demo": "teams/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + } + ] + } + }, + "/teams/{teamId}/memberships": { + "get": { + "summary": "Get Team Memberships", + "operationId": "teamsGetMemberships", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { "$ref": "#/definitions/membershipList" } + } + }, + "x-appwrite": { + "method": "getMemberships", + "weight": 171, + "cookies": false, + "type": "", + "demo": "teams/get-memberships.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-members.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Team Membership", + "operationId": "teamsCreateMembership", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.", + "responses": { + "201": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "createMembership", + "weight": 170, + "cookies": false, + "type": "", + "demo": "teams/create-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "default": null, + "x-example": "email@example.com" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "[NAME]" + } + }, + "required": ["email", "roles", "url"] + } + } + ] + } + }, + "/teams/{teamId}/memberships/{membershipId}": { + "get": { + "summary": "Get Team Membership", + "operationId": "teamsGetMembership", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { "$ref": "#/definitions/membershipList" } + } + }, + "x-appwrite": { + "method": "getMembership", + "weight": 172, + "cookies": false, + "type": "", + "demo": "teams/get-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-member.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Membership Roles", + "operationId": "teamsUpdateMembershipRoles", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions).", + "responses": { + "200": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "updateMembershipRoles", + "weight": 173, + "cookies": false, + "type": "", + "demo": "teams/update-membership-roles.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-roles.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Max length for each role is 32 chars.", + "default": null, + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["roles"] + } + } + ] + }, + "delete": { + "summary": "Delete Team Membership", + "operationId": "teamsDeleteMembership", + "consumes": ["application/json"], + "produces": [], + "tags": ["teams"], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteMembership", + "weight": 175, + "cookies": false, + "type": "", + "demo": "teams/delete-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + } + ] + } + }, + "/teams/{teamId}/memberships/{membershipId}/status": { + "patch": { + "summary": "Update Team Membership Status", + "operationId": "teamsUpdateMembershipStatus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "updateMembershipStatus", + "weight": 174, + "cookies": false, + "type": "", + "demo": "teams/update-membership-status.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "database", + "description": "The Database service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + } + ], + "definitions": { + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { "type": "object", "$ref": "#/definitions/document" }, + "x-example": "" + } + }, + "required": ["total", "documents"] + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { "type": "object", "$ref": "#/definitions/session" }, + "x-example": "" + } + }, + "required": ["total", "sessions"] + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { "type": "object", "$ref": "#/definitions/log" }, + "x-example": "" + } + }, + "required": ["total", "logs"] + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { "type": "object", "$ref": "#/definitions/file" }, + "x-example": "" + } + }, + "required": ["total", "files"] + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { "type": "object", "$ref": "#/definitions/team" }, + "x-example": "" + } + }, + "required": ["total", "teams"] + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { "type": "object", "$ref": "#/definitions/membership" }, + "x-example": "" + } + }, + "required": ["total", "memberships"] + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { "type": "object", "$ref": "#/definitions/execution" }, + "x-example": "" + } + }, + "required": ["total", "executions"] + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { "type": "object", "$ref": "#/definitions/country" }, + "x-example": "" + } + }, + "required": ["total", "countries"] + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { "type": "object", "$ref": "#/definitions/continent" }, + "x-example": "" + } + }, + "required": ["total", "continents"] + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { "type": "object", "$ref": "#/definitions/language" }, + "x-example": "" + } + }, + "required": ["total", "languages"] + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { "type": "object", "$ref": "#/definitions/currency" }, + "x-example": "" + } + }, + "required": ["total", "currencies"] + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { "type": "object", "$ref": "#/definitions/phone" }, + "x-example": "" + } + }, + "required": ["total", "phones"] + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$collection": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e" + }, + "$read": { + "type": "array", + "description": "Document read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "Document write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + } + }, + "additionalProperties": true, + "required": ["$id", "$collection", "$read", "$write"] + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User Email.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "integer", + "description": "Log creation time in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ] + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "registration": { + "type": "integer", + "description": "User registration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "passwordUpdate": { + "type": "integer", + "description": "Unix timestamp of the most recent password update", + "x-example": 1592981250, + "format": "int32" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { "theme": "pink", "timezone": "UTC" }, + "items": { "type": "object", "$ref": "#/definitions/preferences" } + } + }, + "required": [ + "$id", + "name", + "registration", + "status", + "passwordUpdate", + "email", + "emailVerification", + "prefs" + ] + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "integer", + "description": "Session expiration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "integer", + "description": "Date, the Unix timestamp of when the access token expires.", + "x-example": 1592981250, + "format": "int32" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current" + ] + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "integer", + "description": "Token expiration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + } + }, + "required": ["$id", "userId", "secret", "expire"] + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": ["jwt"] + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the Europian Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ] + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "File read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "File write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "dateCreated": { + "type": "integer", + "description": "File creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + } + }, + "required": [ + "$id", + "bucketId", + "$read", + "$write", + "name", + "dateCreated", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded" + ] + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "dateCreated": { + "type": "integer", + "description": "Team creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + } + }, + "required": ["$id", "name", "dateCreated", "total"] + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "VIP" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "invited": { + "type": "integer", + "description": "Date, the user has been invited to join the team in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "joined": { + "type": "integer", + "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { "type": "string" }, + "x-example": "admin" + } + }, + "required": [ + "$id", + "userId", + "teamId", + "name", + "email", + "invited", + "joined", + "confirm", + "roles" + ] + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "Execution read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "dateCreated": { + "type": "integer", + "description": "The execution creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http" + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", + "x-example": "processing" + }, + "statusCode": { + "type": "integer", + "description": "The script status code.", + "x-example": 0, + "format": "int32" + }, + "stdout": { + "type": "string", + "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", + "x-example": "" + }, + "stderr": { + "type": "string", + "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", + "x-example": "" + }, + "time": { + "type": "number", + "description": "The script execution time in seconds.", + "x-example": 0.4, + "format": "double" + } + }, + "required": [ + "$id", + "$read", + "functionId", + "dateCreated", + "trigger", + "status", + "statusCode", + "stdout", + "stderr", + "time" + ] + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": ["name", "code"] + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": ["name", "code"] + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": ["name", "code", "nativeName"] + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ] + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": ["code", "countryCode", "countryName"] + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https://appwrite.io/docs" + } +} diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 8985f3947b..e7b42a6314 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1 +1,13010 @@ -{"swagger":"2.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":37,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":46,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account Session","operationId":"accountCreateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createSession","weight":38,"cookies":false,"type":"","demo":"account\/create-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":45,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":43,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":44,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":39,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}]}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","default":null,"x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","default":null,"x-example":1},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listDocumentLogs","weight":97,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listCollectionLogs","weight":76,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getUsage","weight":74,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":75,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","default":15,"x-example":1}},"required":["name","execute"]}}]},"delete":{"summary":"Delete Function","operationId":"functionsDelete","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":196,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":121,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":120,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"projectId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","default":null,"x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":124,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":129,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":127,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","default":null,"x-example":0}},"required":["limit"]}}]}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":128,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","default":null,"x-example":false}},"required":["status"]}}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":146,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":145,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":147,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":149,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":148,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":136,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":135,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}]}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":137,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":138,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list","default":null,"x-example":null,"items":{"type":"string"}}},"required":["name","scopes"]}}]},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":139,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":126,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","default":null,"x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","default":"","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":"","x-example":"[SECRET]"}},"required":["provider"]}}]}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":141,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":140,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","default":null,"x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","default":"","x-example":"[HOSTNAME]"}},"required":["type","name"]}}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":142,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":143,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":"[HOSTNAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":144,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":125,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","default":null,"x-example":"account"},"status":{"type":"boolean","description":"Service status.","default":null,"x-example":false}},"required":["service","status"]}}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":123,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":131,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":130,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":132,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":133,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":134,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":30000000,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["bucketId","name","permission"]}}]}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":null,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","required":true,"x-upload-id":true,"type":"string","x-example":"[FILE_ID]","in":"formData"},{"name":"file","description":"Binary file.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":163,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":164,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":["owner"],"x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["email","roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":191,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"definitions":{"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerVkAppid":{"type":"string","description":"VK OAuth app ID.","x-example":"123247283472834787438"},"providerVkSecret":{"type":"string","description":"VK OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerVkAppid","providerVkSecret","providerZoomAppid","providerZoomSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerWordpressAppid","providerWordpressSecret","providerStripeAppid","providerStripeSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","url","events","security","httpUser","httpPass"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","name","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","name","type","key","store","hostname","httpUser","httpPass"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{ + "swagger": "2.0", + "info": { + "version": "0.13.4", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", + "termsOfService": "https://appwrite.io/policy/terms", + "contact": { + "name": "Appwrite Team", + "url": "https://appwrite.io/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" + } + }, + "host": "HOSTNAME", + "basePath": "/v1", + "schemes": ["https"], + "consumes": ["application/json", "multipart/form-data"], + "produces": ["application/json"], + "securityDefinitions": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { "demo": "5df5acd0d48c2" } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { "demo": "919c2d18fb5d4...a2ae413da83346ad2" } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { "demo": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..." } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { "demo": "en" } + }, + "Mode": { + "type": "apiKey", + "name": "X-Appwrite-Mode", + "description": "", + "in": "header", + "x-appwrite": { "demo": "" } + } + }, + "paths": { + "/account": { + "get": { + "summary": "Get Account", + "operationId": "accountGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user data as JSON object.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "post": { + "summary": "Create Account", + "operationId": "accountCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [/account/verfication](/docs/client/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](/docs/client/account#accountCreateSession).", + "responses": { + "201": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 37, + "cookies": false, + "type": "", + "demo": "account/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[USER_ID]" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "[NAME]" + } + }, + "required": ["userId", "email", "password"] + } + } + ] + }, + "delete": { + "summary": "Delete Account", + "operationId": "accountDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 56, + "cookies": false, + "type": "", + "demo": "account/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/account/email": { + "patch": { + "summary": "Update Account Email", + "operationId": "accountUpdateEmail", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 54, + "cookies": false, + "type": "", + "demo": "account/update-email.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["email", "password"] + } + } + ] + } + }, + "/account/jwt": { + "post": { + "summary": "Create Account JWT", + "operationId": "accountCreateJWT", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.", + "responses": { + "201": { + "description": "JWT", + "schema": { "$ref": "#/definitions/jwt" } + } + }, + "x-appwrite": { + "method": "createJWT", + "weight": 46, + "cookies": false, + "type": "", + "demo": "account/create-j-w-t.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-jwt.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }] + } + }, + "/account/logs": { + "get": { + "summary": "Get Account Logs", + "operationId": "accountGetLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "schema": { "$ref": "#/definitions/logList" } + } + }, + "x-appwrite": { + "method": "getLogs", + "weight": 50, + "cookies": false, + "type": "", + "demo": "account/get-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "limit", + "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "/account/name": { + "patch": { + "summary": "Update Account Name", + "operationId": "accountUpdateName", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 52, + "cookies": false, + "type": "", + "demo": "account/update-name.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + } + }, + "/account/password": { + "patch": { + "summary": "Update Account Password", + "operationId": "accountUpdatePassword", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePassword", + "weight": 53, + "cookies": false, + "type": "", + "demo": "account/update-password.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password" + } + }, + "required": ["password"] + } + } + ] + } + }, + "/account/prefs": { + "get": { + "summary": "Get Account Preferences", + "operationId": "accountGetPrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user preferences as a key-value object.", + "responses": { + "200": { + "description": "Preferences", + "schema": { "$ref": "#/definitions/preferences" } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account/get-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "patch": { + "summary": "Update Account Preferences", + "operationId": "accountUpdatePrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 55, + "cookies": false, + "type": "", + "demo": "account/update-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": ["prefs"] + } + } + ] + } + }, + "/account/recovery": { + "post": { + "summary": "Create Password Recovery", + "operationId": "accountCreateRecovery", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createRecovery", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account/create-recovery.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": ["url:{url},email:{param-email}", "ip:{ip}"], + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + } + }, + "required": ["email", "url"] + } + } + ] + }, + "put": { + "summary": "Create Password Recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "updateRecovery", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account/update-recovery.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "default": null, + "x-example": "[SECRET]" + }, + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "passwordAgain": { + "type": "string", + "description": "Repeat new user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["userId", "secret", "password", "passwordAgain"] + } + } + ] + } + }, + "/account/sessions": { + "get": { + "summary": "Get Account Sessions", + "operationId": "accountGetSessions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user list of active sessions across different devices.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { "$ref": "#/definitions/sessionList" } + } + }, + "x-appwrite": { + "method": "getSessions", + "weight": 49, + "cookies": false, + "type": "", + "demo": "account/get-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "post": { + "summary": "Create Account Session", + "operationId": "accountCreateSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.", + "responses": { + "201": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "createSession", + "weight": 38, + "cookies": false, + "type": "", + "demo": "account/create-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["email", "password"] + } + } + ] + }, + "delete": { + "summary": "Delete All Account Sessions", + "operationId": "accountDeleteSessions", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSessions", + "weight": 59, + "cookies": false, + "type": "", + "demo": "account/delete-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/account/sessions/anonymous": { + "post": { + "summary": "Create Anonymous Session", + "operationId": "accountCreateAnonymousSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](/docs/client/account#accountUpdateEmail) or create an [OAuth2 session](/docs/client/account#accountCreateOAuth2Session).", + "responses": { + "201": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "createAnonymousSession", + "weight": 45, + "cookies": false, + "type": "", + "demo": "account/create-anonymous-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-anonymous.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }] + } + }, + "/account/sessions/magic-url": { + "post": { + "summary": "Create Magic URL session", + "operationId": "accountCreateMagicURLSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT /account/sessions/magic-url](/docs/client/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createMagicURLSession", + "weight": 43, + "cookies": false, + "type": "", + "demo": "account/create-magic-u-r-l-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},email:{param-email}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[USER_ID]" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": "", + "x-example": "https://example.com" + } + }, + "required": ["userId", "email"] + } + } + ] + }, + "put": { + "summary": "Create Magic URL session (confirmation)", + "operationId": "accountUpdateMagicURLSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete creating the session with the Magic URL. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/sessions/magic-url](/docs/client/account#accountCreateMagicURLSession) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "updateMagicURLSession", + "weight": 44, + "cookies": false, + "type": "", + "demo": "account/update-magic-u-r-l-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-magic-url-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + }, + "/account/sessions/oauth2/{provider}": { + "get": { + "summary": "Create Account Session with OAuth2", + "operationId": "accountCreateOAuth2Session", + "consumes": ["application/json"], + "produces": ["text/html"], + "tags": ["account"], + "description": "Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n", + "responses": { "301": { "description": "No content" } }, + "x-appwrite": { + "method": "createOAuth2Session", + "weight": 39, + "cookies": false, + "type": "webAuth", + "demo": "account/create-o-auth2session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-session-oauth2.md", + "rate-limit": 50, + "rate-time": 3600, + "rate-key": "ip:{ip}", + "scope": "public", + "platforms": ["client"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "provider", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, bitbucket, bitly, box, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, paypal, paypalSandbox, salesforce, slack, spotify, tradeshift, tradeshiftBox, twitch, vk, zoom, yahoo, yammer, yandex, wordpress, stripe.", + "required": true, + "type": "string", + "x-example": "amazon", + "in": "path" + }, + { + "name": "success", + "description": "URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "default": "", + "in": "query" + }, + { + "name": "failure", + "description": "URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "required": false, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "default": "", + "in": "query" + }, + { + "name": "scopes", + "description": "A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + } + ] + } + }, + "/account/sessions/{sessionId}": { + "get": { + "summary": "Get Session By ID", + "operationId": "accountGetSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "getSession", + "weight": 51, + "cookies": false, + "type": "", + "demo": "account/get-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Session (Refresh Tokens)", + "operationId": "accountUpdateSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "updateSession", + "weight": 58, + "cookies": false, + "type": "", + "demo": "account/update-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Account Session", + "operationId": "accountDeleteSession", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSession", + "weight": 57, + "cookies": false, + "type": "", + "demo": "account/delete-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + } + }, + "/account/verification": { + "post": { + "summary": "Create Email Verification", + "operationId": "accountCreateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createVerification", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account/create-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + } + }, + "required": ["url"] + } + } + ] + }, + "put": { + "summary": "Create Email Verification (confirmation)", + "operationId": "accountUpdateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "updateVerification", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account/update-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + }, + "/avatars/browsers/{code}": { + "get": { + "summary": "Get Browser Icon", + "operationId": "avatarsGetBrowser", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getBrowser", + "weight": 65, + "cookies": false, + "type": "location", + "demo": "avatars/get-browser.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "type": "string", + "x-example": "aa", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/credit-cards/{code}": { + "get": { + "summary": "Get Credit Card Icon", + "operationId": "avatarsGetCreditCard", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getCreditCard", + "weight": 64, + "cookies": false, + "type": "location", + "demo": "avatars/get-credit-card.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", + "required": true, + "type": "string", + "x-example": "amex", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/favicon": { + "get": { + "summary": "Get Favicon", + "operationId": "avatarsGetFavicon", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["avatars"], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFavicon", + "weight": 68, + "cookies": false, + "type": "location", + "demo": "avatars/get-favicon.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "in": "query" + } + ] + } + }, + "/avatars/flags/{code}": { + "get": { + "summary": "Get Country Flag", + "operationId": "avatarsGetFlag", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFlag", + "weight": 66, + "cookies": false, + "type": "location", + "demo": "avatars/get-flag.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "type": "string", + "x-example": "af", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/image": { + "get": { + "summary": "Get Image from URL", + "operationId": "avatarsGetImage", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["avatars"], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getImage", + "weight": 67, + "cookies": false, + "type": "location", + "demo": "avatars/get-image.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + } + ] + } + }, + "/avatars/initials": { + "get": { + "summary": "Get User Initials", + "operationId": "avatarsGetInitials", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getInitials", + "weight": 70, + "cookies": false, + "type": "location", + "demo": "avatars/get-initials.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "type": "string", + "x-example": "[NAME]", + "default": "", + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "color", + "description": "Changes text color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + } + ] + } + }, + "/avatars/qr": { + "get": { + "summary": "Get QR Code", + "operationId": "avatarsGetQR", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getQR", + "weight": 69, + "cookies": false, + "type": "location", + "demo": "avatars/get-q-r.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "type": "string", + "x-example": "[TEXT]", + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 0 to 1000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "query" + } + ] + } + }, + "/database/collections": { + "get": { + "summary": "List Collections", + "operationId": "databaseListCollections", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Collections List", + "schema": { "$ref": "#/definitions/collectionList" } + } + }, + "x-appwrite": { + "method": "listCollections", + "weight": 72, + "cookies": false, + "type": "", + "demo": "database/list-collections.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Collection", + "operationId": "databaseCreateCollection", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a new Collection.", + "responses": { + "201": { + "description": "Collection", + "schema": { "$ref": "#/definitions/collection" } + } + }, + "x-appwrite": { + "method": "createCollection", + "weight": 71, + "cookies": false, + "type": "", + "demo": "database/create-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[COLLECTION_ID]" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "document" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": [ + "collectionId", + "name", + "permission", + "read", + "write" + ] + } + } + ] + } + }, + "/database/collections/{collectionId}": { + "get": { + "summary": "Get Collection", + "operationId": "databaseGetCollection", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "schema": { "$ref": "#/definitions/collection" } + } + }, + "x-appwrite": { + "method": "getCollection", + "weight": 73, + "cookies": false, + "type": "", + "demo": "database/get-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Collection", + "operationId": "databaseUpdateCollection", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "schema": { "$ref": "#/definitions/collection" } + } + }, + "x-appwrite": { + "method": "updateCollection", + "weight": 77, + "cookies": false, + "type": "", + "demo": "database/update-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "document" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled?", + "default": true, + "x-example": false + } + }, + "required": ["name", "permission"] + } + } + ] + }, + "delete": { + "summary": "Delete Collection", + "operationId": "databaseDeleteCollection", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteCollection", + "weight": 78, + "cookies": false, + "type": "", + "demo": "database/delete-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/attributes": { + "get": { + "summary": "List Attributes", + "operationId": "databaseListAttributes", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "Attributes List", + "schema": { "$ref": "#/definitions/attributeList" } + } + }, + "x-appwrite": { + "method": "listAttributes", + "weight": 87, + "cookies": false, + "type": "", + "demo": "database/list-attributes.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/attributes/boolean": { + "post": { + "summary": "Create Boolean Attribute", + "operationId": "databaseCreateBooleanAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a boolean attribute.\n", + "responses": { + "201": { + "description": "AttributeBoolean", + "schema": { "$ref": "#/definitions/attributeBoolean" } + } + }, + "x-appwrite": { + "method": "createBooleanAttribute", + "weight": 86, + "cookies": false, + "type": "", + "demo": "database/create-boolean-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/email": { + "post": { + "summary": "Create Email Attribute", + "operationId": "databaseCreateEmailAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create an email attribute.\n", + "responses": { + "201": { + "description": "AttributeEmail", + "schema": { "$ref": "#/definitions/attributeEmail" } + } + }, + "x-appwrite": { + "method": "createEmailAttribute", + "weight": 80, + "cookies": false, + "type": "", + "demo": "database/create-email-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/enum": { + "post": { + "summary": "Create Enum Attribute", + "operationId": "databaseCreateEnumAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "201": { + "description": "AttributeEnum", + "schema": { "$ref": "#/definitions/attributeEnum" } + } + }, + "x-appwrite": { + "method": "createEnumAttribute", + "weight": 81, + "cookies": false, + "type": "", + "demo": "database/create-enum-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-attribute-enum.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type. Uses length of longest element to determine size.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "[DEFAULT]" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "elements", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/float": { + "post": { + "summary": "Create Float Attribute", + "operationId": "databaseCreateFloatAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "201": { + "description": "AttributeFloat", + "schema": { "$ref": "#/definitions/attributeFloat" } + } + }, + "x-appwrite": { + "method": "createFloatAttribute", + "weight": 85, + "cookies": false, + "type": "", + "demo": "database/create-float-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/integer": { + "post": { + "summary": "Create Integer Attribute", + "operationId": "databaseCreateIntegerAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "201": { + "description": "AttributeInteger", + "schema": { "$ref": "#/definitions/attributeInteger" } + } + }, + "x-appwrite": { + "method": "createIntegerAttribute", + "weight": 84, + "cookies": false, + "type": "", + "demo": "database/create-integer-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/ip": { + "post": { + "summary": "Create IP Address Attribute", + "operationId": "databaseCreateIpAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create IP address attribute.\n", + "responses": { + "201": { + "description": "AttributeIP", + "schema": { "$ref": "#/definitions/attributeIp" } + } + }, + "x-appwrite": { + "method": "createIpAttribute", + "weight": 82, + "cookies": false, + "type": "", + "demo": "database/create-ip-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/string": { + "post": { + "summary": "Create String Attribute", + "operationId": "databaseCreateStringAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a string attribute.\n", + "responses": { + "201": { + "description": "AttributeString", + "schema": { "$ref": "#/definitions/attributeString" } + } + }, + "x-appwrite": { + "method": "createStringAttribute", + "weight": 79, + "cookies": false, + "type": "", + "demo": "database/create-string-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "[DEFAULT]" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "size", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/url": { + "post": { + "summary": "Create URL Attribute", + "operationId": "databaseCreateUrlAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a URL attribute.\n", + "responses": { + "201": { + "description": "AttributeURL", + "schema": { "$ref": "#/definitions/attributeUrl" } + } + }, + "x-appwrite": { + "method": "createUrlAttribute", + "weight": 83, + "cookies": false, + "type": "", + "demo": "database/create-url-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https://example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/{key}": { + "get": { + "summary": "Get Attribute", + "operationId": "databaseGetAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString", + "schema": { + "x-oneOf": [ + { "$ref": "#/definitions/attributeBoolean" }, + { "$ref": "#/definitions/attributeInteger" }, + { "$ref": "#/definitions/attributeFloat" }, + { "$ref": "#/definitions/attributeEmail" }, + { "$ref": "#/definitions/attributeEnum" }, + { "$ref": "#/definitions/attributeUrl" }, + { "$ref": "#/definitions/attributeIp" }, + { "$ref": "#/definitions/attributeString" } + ] + } + } + }, + "x-appwrite": { + "method": "getAttribute", + "weight": 88, + "cookies": false, + "type": "", + "demo": "database/get-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Attribute", + "operationId": "databaseDeleteAttribute", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteAttribute", + "weight": 89, + "cookies": false, + "type": "", + "demo": "database/delete-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/documents": { + "get": { + "summary": "List Documents", + "operationId": "databaseListDocuments", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Documents List", + "schema": { "$ref": "#/definitions/documentList" } + } + }, + "x-appwrite": { + "method": "listDocuments", + "weight": 95, + "cookies": false, + "type": "", + "demo": "database/list-documents.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderAttributes", + "description": "Array of attributes used to sort results.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + }, + { + "name": "orderTypes", + "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create Document", + "operationId": "databaseCreateDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "createDocument", + "weight": 94, + "cookies": false, + "type": "", + "demo": "database/create-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[DOCUMENT_ID]" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{}" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": ["documentId", "data"] + } + } + ] + } + }, + "/database/collections/{collectionId}/documents/{documentId}": { + "get": { + "summary": "Get Document", + "operationId": "databaseGetDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "getDocument", + "weight": 96, + "cookies": false, + "type": "", + "demo": "database/get-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Document", + "operationId": "databaseUpdateDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "updateDocument", + "weight": 98, + "cookies": false, + "type": "", + "demo": "database/update-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": {}, + "x-example": "{}" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": ["data"] + } + } + ] + }, + "delete": { + "summary": "Delete Document", + "operationId": "databaseDeleteDocument", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "Delete a document by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteDocument", + "weight": 99, + "cookies": false, + "type": "", + "demo": "database/delete-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/documents/{documentId}/logs": { + "get": { + "summary": "List Document Logs", + "operationId": "databaseListDocumentLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get the document activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { "$ref": "#/definitions/logList" } + } + }, + "x-appwrite": { + "method": "listDocumentLogs", + "weight": 97, + "cookies": false, + "type": "", + "demo": "database/list-document-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "/database/collections/{collectionId}/indexes": { + "get": { + "summary": "List Indexes", + "operationId": "databaseListIndexes", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "Indexes List", + "schema": { "$ref": "#/definitions/indexList" } + } + }, + "x-appwrite": { + "method": "listIndexes", + "weight": 91, + "cookies": false, + "type": "", + "demo": "database/list-indexes.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + }, + "post": { + "summary": "Create Index", + "operationId": "databaseCreateIndex", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "201": { + "description": "Index", + "schema": { "$ref": "#/definitions/index" } + } + }, + "x-appwrite": { + "method": "createIndex", + "weight": 90, + "cookies": false, + "type": "", + "demo": "database/create-index.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key" + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "orders": { + "type": "array", + "description": "Array of index orders.", + "default": [], + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["key", "type", "attributes"] + } + } + ] + } + }, + "/database/collections/{collectionId}/indexes/{key}": { + "get": { + "summary": "Get Index", + "operationId": "databaseGetIndex", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "Index", + "schema": { "$ref": "#/definitions/index" } + } + }, + "x-appwrite": { + "method": "getIndex", + "weight": 92, + "cookies": false, + "type": "", + "demo": "database/get-index.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Index", + "operationId": "databaseDeleteIndex", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteIndex", + "weight": 93, + "cookies": false, + "type": "", + "demo": "database/delete-index.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/logs": { + "get": { + "summary": "List Collection Logs", + "operationId": "databaseListCollectionLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get the collection activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { "$ref": "#/definitions/logList" } + } + }, + "x-appwrite": { + "method": "listCollectionLogs", + "weight": 76, + "cookies": false, + "type": "", + "demo": "database/list-collection-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-collection-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "/database/usage": { + "get": { + "summary": "Get usage stats for the database", + "operationId": "databaseGetUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "UsageDatabase", + "schema": { "$ref": "#/definitions/usageDatabase" } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 74, + "cookies": false, + "type": "", + "demo": "database/get-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "default": "30d", + "in": "query" + } + ] + } + }, + "/database/{collectionId}/usage": { + "get": { + "summary": "Get usage stats for a collection", + "operationId": "databaseGetCollectionUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "UsageCollection", + "schema": { "$ref": "#/definitions/usageCollection" } + } + }, + "x-appwrite": { + "method": "getCollectionUsage", + "weight": 75, + "cookies": false, + "type": "", + "demo": "database/get-collection-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "default": "30d", + "in": "query" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + } + }, + "/functions": { + "get": { + "summary": "List Functions", + "operationId": "functionsList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "schema": { "$ref": "#/definitions/functionList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 193, + "cookies": false, + "type": "", + "demo": "functions/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Function", + "operationId": "functionsCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Create a new function. You can pass a list of [permissions](/docs/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 192, + "cookies": false, + "type": "", + "demo": "functions/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "functionId": { + "type": "string", + "description": "Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[FUNCTION_ID]" + }, + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "execute": { + "type": "array", + "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": null, + "x-example": "node-14.5" + }, + "vars": { + "type": "object", + "description": "Key-value JSON object that will be passed to the function as environment variables.", + "default": [], + "x-example": "{}" + }, + "events": { + "type": "array", + "description": "Events list.", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Function maximum execution time in seconds.", + "default": 15, + "x-example": 1 + } + }, + "required": ["functionId", "name", "execute", "runtime"] + } + } + ] + } + }, + "/functions/runtimes": { + "get": { + "summary": "List runtimes", + "operationId": "functionsListRuntimes", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all runtimes that are currently active on your instance.", + "responses": { + "200": { + "description": "Runtimes List", + "schema": { "$ref": "#/definitions/runtimeList" } + } + }, + "x-appwrite": { + "method": "listRuntimes", + "weight": 194, + "cookies": false, + "type": "", + "demo": "functions/list-runtimes.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/functions/{functionId}": { + "get": { + "summary": "Get Function", + "operationId": "functionsGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 195, + "cookies": false, + "type": "", + "demo": "functions/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Function", + "operationId": "functionsUpdate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "update", + "weight": 197, + "cookies": false, + "type": "", + "demo": "functions/update.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "execute": { + "type": "array", + "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "vars": { + "type": "object", + "description": "Key-value JSON object that will be passed to the function as environment variables.", + "default": [], + "x-example": "{}" + }, + "events": { + "type": "array", + "description": "Events list.", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Maximum execution time in seconds.", + "default": 15, + "x-example": 1 + } + }, + "required": ["name", "execute"] + } + } + ] + }, + "delete": { + "summary": "Delete Function", + "operationId": "functionsDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["functions"], + "description": "Delete a function by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 199, + "cookies": false, + "type": "", + "demo": "functions/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/deployments": { + "get": { + "summary": "List Deployments", + "operationId": "functionsListDeployments", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all the project's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { "$ref": "#/definitions/deploymentList" } + } + }, + "x-appwrite": { + "method": "listDeployments", + "weight": 201, + "cookies": false, + "type": "", + "demo": "functions/list-deployments.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Deployment", + "operationId": "functionsCreateDeployment", + "consumes": ["multipart/form-data"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](/docs/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.", + "responses": { + "201": { + "description": "Deployment", + "schema": { "$ref": "#/definitions/deployment" } + } + }, + "x-appwrite": { + "method": "createDeployment", + "weight": 200, + "cookies": false, + "type": "", + "demo": "functions/create-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": true, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "entrypoint", + "description": "Entrypoint File.", + "required": true, + "type": "string", + "x-example": "[ENTRYPOINT]", + "in": "formData" + }, + { + "name": "code", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "activate", + "description": "Automatically activate the deployment when it is finished building.", + "required": true, + "type": "boolean", + "x-example": false, + "in": "formData" + } + ] + } + }, + "/functions/{functionId}/deployments/{deploymentId}": { + "get": { + "summary": "Get Deployment", + "operationId": "functionsGetDeployment", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a code deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { "$ref": "#/definitions/deploymentList" } + } + }, + "x-appwrite": { + "method": "getDeployment", + "weight": 202, + "cookies": false, + "type": "", + "demo": "functions/get-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Function Deployment", + "operationId": "functionsUpdateDeployment", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.", + "responses": { + "200": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "updateDeployment", + "weight": 198, + "cookies": false, + "type": "", + "demo": "functions/update-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Deployment", + "operationId": "functionsDeleteDeployment", + "consumes": ["application/json"], + "produces": [], + "tags": ["functions"], + "description": "Delete a code deployment by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteDeployment", + "weight": 203, + "cookies": false, + "type": "", + "demo": "functions/delete-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}": { + "post": { + "summary": "Retry Build", + "operationId": "functionsRetryBuild", + "consumes": ["application/json"], + "produces": [], + "tags": ["functions"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "retryBuild", + "weight": 207, + "cookies": false, + "type": "", + "demo": "functions/retry-build.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/retry-build.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + }, + { + "name": "buildId", + "description": "Build unique ID.", + "required": true, + "type": "string", + "x-example": "[BUILD_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/executions": { + "get": { + "summary": "List Executions", + "operationId": "functionsListExecutions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Executions List", + "schema": { "$ref": "#/definitions/executionList" } + } + }, + "x-appwrite": { + "method": "listExecutions", + "weight": 205, + "cookies": false, + "type": "", + "demo": "functions/list-executions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Execution", + "operationId": "functionsCreateExecution", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "schema": { "$ref": "#/definitions/execution" } + } + }, + "x-appwrite": { + "method": "createExecution", + "weight": 204, + "cookies": false, + "type": "", + "demo": "functions/create-execution.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "String of custom data to send to function.", + "default": "", + "x-example": "[DATA]" + }, + "async": { + "type": "boolean", + "description": "Execute code asynchronously. Default value is true.", + "default": true, + "x-example": false + } + } + } + } + ] + } + }, + "/functions/{functionId}/executions/{executionId}": { + "get": { + "summary": "Get Execution", + "operationId": "functionsGetExecution", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { "$ref": "#/definitions/execution" } + } + }, + "x-appwrite": { + "method": "getExecution", + "weight": 206, + "cookies": false, + "type": "", + "demo": "functions/get-execution.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "[EXECUTION_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/usage": { + "get": { + "summary": "Get Function Usage", + "operationId": "functionsGetUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "", + "responses": { + "200": { + "description": "UsageFunctions", + "schema": { "$ref": "#/definitions/usageFunctions" } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 196, + "cookies": false, + "type": "", + "demo": "functions/get-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "default": "30d", + "in": "query" + } + ] + } + }, + "/health": { + "get": { + "summary": "Get HTTP", + "operationId": "healthGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite HTTP server is up and responsive.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 107, + "cookies": false, + "type": "", + "demo": "health/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/anti-virus": { + "get": { + "summary": "Get Antivirus", + "operationId": "healthGetAntivirus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite Antivirus server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Antivirus", + "schema": { "$ref": "#/definitions/healthAntivirus" } + } + }, + "x-appwrite": { + "method": "getAntivirus", + "weight": 118, + "cookies": false, + "type": "", + "demo": "health/get-antivirus.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-anti-virus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/cache": { + "get": { + "summary": "Get Cache", + "operationId": "healthGetCache", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite in-memory cache server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "getCache", + "weight": 110, + "cookies": false, + "type": "", + "demo": "health/get-cache.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite database server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "getDB", + "weight": 109, + "cookies": false, + "type": "", + "demo": "health/get-d-b.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-db.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/certificates": { + "get": { + "summary": "Get Certificates Queue", + "operationId": "healthGetQueueCertificates", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueCertificates", + "weight": 115, + "cookies": false, + "type": "", + "demo": "health/get-queue-certificates.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-certificates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/functions": { + "get": { + "summary": "Get Functions Queue", + "operationId": "healthGetQueueFunctions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueFunctions", + "weight": 116, + "cookies": false, + "type": "", + "demo": "health/get-queue-functions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/logs": { + "get": { + "summary": "Get Logs Queue", + "operationId": "healthGetQueueLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueLogs", + "weight": 113, + "cookies": false, + "type": "", + "demo": "health/get-queue-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/usage": { + "get": { + "summary": "Get Usage Queue", + "operationId": "healthGetQueueUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueUsage", + "weight": 114, + "cookies": false, + "type": "", + "demo": "health/get-queue-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/webhooks": { + "get": { + "summary": "Get Webhooks Queue", + "operationId": "healthGetQueueWebhooks", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueWebhooks", + "weight": 112, + "cookies": false, + "type": "", + "demo": "health/get-queue-webhooks.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-webhooks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/storage/local": { + "get": { + "summary": "Get Local Storage", + "operationId": "healthGetStorageLocal", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite local storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "getStorageLocal", + "weight": 117, + "cookies": false, + "type": "", + "demo": "health/get-storage-local.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-local.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/time": { + "get": { + "summary": "Get Time", + "operationId": "healthGetTime", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "responses": { + "200": { + "description": "Health Time", + "schema": { "$ref": "#/definitions/healthTime" } + } + }, + "x-appwrite": { + "method": "getTime", + "weight": 111, + "cookies": false, + "type": "", + "demo": "health/get-time.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-time.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/locale": { + "get": { + "summary": "Get User Locale", + "operationId": "localeGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "schema": { "$ref": "#/definitions/locale" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 100, + "cookies": false, + "type": "", + "demo": "locale/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-locale.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/continents": { + "get": { + "summary": "List Continents", + "operationId": "localeGetContinents", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "schema": { "$ref": "#/definitions/continentList" } + } + }, + "x-appwrite": { + "method": "getContinents", + "weight": 104, + "cookies": false, + "type": "", + "demo": "locale/get-continents.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/countries": { + "get": { + "summary": "List Countries", + "operationId": "localeGetCountries", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { "$ref": "#/definitions/countryList" } + } + }, + "x-appwrite": { + "method": "getCountries", + "weight": 101, + "cookies": false, + "type": "", + "demo": "locale/get-countries.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/countries/eu": { + "get": { + "summary": "List EU Countries", + "operationId": "localeGetCountriesEU", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { "$ref": "#/definitions/countryList" } + } + }, + "x-appwrite": { + "method": "getCountriesEU", + "weight": 102, + "cookies": false, + "type": "", + "demo": "locale/get-countries-e-u.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/countries/phones": { + "get": { + "summary": "List Countries Phone Codes", + "operationId": "localeGetCountriesPhones", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "schema": { "$ref": "#/definitions/phoneList" } + } + }, + "x-appwrite": { + "method": "getCountriesPhones", + "weight": 103, + "cookies": false, + "type": "", + "demo": "locale/get-countries-phones.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/currencies": { + "get": { + "summary": "List Currencies", + "operationId": "localeGetCurrencies", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "schema": { "$ref": "#/definitions/currencyList" } + } + }, + "x-appwrite": { + "method": "getCurrencies", + "weight": 105, + "cookies": false, + "type": "", + "demo": "locale/get-currencies.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/languages": { + "get": { + "summary": "List Languages", + "operationId": "localeGetLanguages", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "schema": { "$ref": "#/definitions/languageList" } + } + }, + "x-appwrite": { + "method": "getLanguages", + "weight": 106, + "cookies": false, + "type": "", + "demo": "locale/get-languages.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/projects": { + "get": { + "summary": "List Projects", + "operationId": "projectsList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Projects List", + "schema": { "$ref": "#/definitions/projectList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 121, + "cookies": false, + "type": "", + "demo": "projects/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Results offset. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the project used as the starting point for the query, excluding the project itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Project", + "operationId": "projectsCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "201": { + "description": "Project", + "schema": { "$ref": "#/definitions/project" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 120, + "cookies": false, + "type": "", + "demo": "projects/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[PROJECT_ID]" + }, + "name": { + "type": "string", + "description": "Project name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "teamId": { + "type": "string", + "description": "Team unique ID.", + "default": null, + "x-example": "[TEAM_ID]" + }, + "description": { + "type": "string", + "description": "Project description. Max length: 256 chars.", + "default": "", + "x-example": "[DESCRIPTION]" + }, + "logo": { + "type": "string", + "description": "Project logo.", + "default": "", + "x-example": "[LOGO]" + }, + "url": { + "type": "string", + "description": "Project URL.", + "default": "", + "x-example": "https://example.com" + }, + "legalName": { + "type": "string", + "description": "Project legal Name. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_NAME]" + }, + "legalCountry": { + "type": "string", + "description": "Project legal Country. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_COUNTRY]" + }, + "legalState": { + "type": "string", + "description": "Project legal State. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_STATE]" + }, + "legalCity": { + "type": "string", + "description": "Project legal City. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_CITY]" + }, + "legalAddress": { + "type": "string", + "description": "Project legal Address. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_ADDRESS]" + }, + "legalTaxId": { + "type": "string", + "description": "Project legal Tax ID. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_TAX_ID]" + } + }, + "required": ["projectId", "name", "teamId"] + } + } + ] + } + }, + "/projects/{projectId}": { + "get": { + "summary": "Get Project", + "operationId": "projectsGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { "$ref": "#/definitions/project" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 122, + "cookies": false, + "type": "", + "demo": "projects/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Project", + "operationId": "projectsUpdate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { "$ref": "#/definitions/project" } + } + }, + "x-appwrite": { + "method": "update", + "weight": 124, + "cookies": false, + "type": "", + "demo": "projects/update.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Project name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "description": { + "type": "string", + "description": "Project description. Max length: 256 chars.", + "default": "", + "x-example": "[DESCRIPTION]" + }, + "logo": { + "type": "string", + "description": "Project logo.", + "default": "", + "x-example": "[LOGO]" + }, + "url": { + "type": "string", + "description": "Project URL.", + "default": "", + "x-example": "https://example.com" + }, + "legalName": { + "type": "string", + "description": "Project legal name. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_NAME]" + }, + "legalCountry": { + "type": "string", + "description": "Project legal country. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_COUNTRY]" + }, + "legalState": { + "type": "string", + "description": "Project legal state. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_STATE]" + }, + "legalCity": { + "type": "string", + "description": "Project legal city. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_CITY]" + }, + "legalAddress": { + "type": "string", + "description": "Project legal address. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_ADDRESS]" + }, + "legalTaxId": { + "type": "string", + "description": "Project legal tax ID. Max length: 256 chars.", + "default": "", + "x-example": "[LEGAL_TAX_ID]" + } + }, + "required": ["name"] + } + } + ] + }, + "delete": { + "summary": "Delete Project", + "operationId": "projectsDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["projects"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 129, + "cookies": false, + "type": "", + "demo": "projects/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "Your user password for confirmation. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["password"] + } + } + ] + } + }, + "/projects/{projectId}/auth/limit": { + "patch": { + "summary": "Update Project users limit", + "operationId": "projectsUpdateAuthLimit", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { "$ref": "#/definitions/project" } + } + }, + "x-appwrite": { + "method": "updateAuthLimit", + "weight": 127, + "cookies": false, + "type": "", + "demo": "projects/update-auth-limit.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "description": "Set the max number of users allowed in this project. Use 0 for unlimited.", + "default": null, + "x-example": 0 + } + }, + "required": ["limit"] + } + } + ] + } + }, + "/projects/{projectId}/auth/{method}": { + "patch": { + "summary": "Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.", + "operationId": "projectsUpdateAuthStatus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { "$ref": "#/definitions/project" } + } + }, + "x-appwrite": { + "method": "updateAuthStatus", + "weight": 128, + "cookies": false, + "type": "", + "demo": "projects/update-auth-status.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "method", + "description": "Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone", + "required": true, + "type": "string", + "x-example": "email-password", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "Set the status of this auth method.", + "default": null, + "x-example": false + } + }, + "required": ["status"] + } + } + ] + } + }, + "/projects/{projectId}/domains": { + "get": { + "summary": "List Domains", + "operationId": "projectsListDomains", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Domains List", + "schema": { "$ref": "#/definitions/domainList" } + } + }, + "x-appwrite": { + "method": "listDomains", + "weight": 146, + "cookies": false, + "type": "", + "demo": "projects/list-domains.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + } + ] + }, + "post": { + "summary": "Create Domain", + "operationId": "projectsCreateDomain", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "201": { + "description": "Domain", + "schema": { "$ref": "#/definitions/domain" } + } + }, + "x-appwrite": { + "method": "createDomain", + "weight": 145, + "cookies": false, + "type": "", + "demo": "projects/create-domain.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "domain": { + "type": "string", + "description": "Domain name.", + "default": null, + "x-example": null + } + }, + "required": ["domain"] + } + } + ] + } + }, + "/projects/{projectId}/domains/{domainId}": { + "get": { + "summary": "Get Domain", + "operationId": "projectsGetDomain", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Domain", + "schema": { "$ref": "#/definitions/domain" } + } + }, + "x-appwrite": { + "method": "getDomain", + "weight": 147, + "cookies": false, + "type": "", + "demo": "projects/get-domain.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "type": "string", + "x-example": "[DOMAIN_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Domain", + "operationId": "projectsDeleteDomain", + "consumes": ["application/json"], + "produces": [], + "tags": ["projects"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteDomain", + "weight": 149, + "cookies": false, + "type": "", + "demo": "projects/delete-domain.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "type": "string", + "x-example": "[DOMAIN_ID]", + "in": "path" + } + ] + } + }, + "/projects/{projectId}/domains/{domainId}/verification": { + "patch": { + "summary": "Update Domain Verification Status", + "operationId": "projectsUpdateDomainVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Domain", + "schema": { "$ref": "#/definitions/domain" } + } + }, + "x-appwrite": { + "method": "updateDomainVerification", + "weight": 148, + "cookies": false, + "type": "", + "demo": "projects/update-domain-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "domainId", + "description": "Domain unique ID.", + "required": true, + "type": "string", + "x-example": "[DOMAIN_ID]", + "in": "path" + } + ] + } + }, + "/projects/{projectId}/keys": { + "get": { + "summary": "List Keys", + "operationId": "projectsListKeys", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "API Keys List", + "schema": { "$ref": "#/definitions/keyList" } + } + }, + "x-appwrite": { + "method": "listKeys", + "weight": 136, + "cookies": false, + "type": "", + "demo": "projects/list-keys.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + } + ] + }, + "post": { + "summary": "Create Key", + "operationId": "projectsCreateKey", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "201": { + "description": "Key", + "schema": { "$ref": "#/definitions/key" } + } + }, + "x-appwrite": { + "method": "createKey", + "weight": 135, + "cookies": false, + "type": "", + "demo": "projects/create-key.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "scopes": { + "type": "array", + "description": "Key scopes list.", + "default": null, + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["name", "scopes"] + } + } + ] + } + }, + "/projects/{projectId}/keys/{keyId}": { + "get": { + "summary": "Get Key", + "operationId": "projectsGetKey", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Key", + "schema": { "$ref": "#/definitions/key" } + } + }, + "x-appwrite": { + "method": "getKey", + "weight": 137, + "cookies": false, + "type": "", + "demo": "projects/get-key.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "[KEY_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Key", + "operationId": "projectsUpdateKey", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Key", + "schema": { "$ref": "#/definitions/key" } + } + }, + "x-appwrite": { + "method": "updateKey", + "weight": 138, + "cookies": false, + "type": "", + "demo": "projects/update-key.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "[KEY_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Key name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "scopes": { + "type": "array", + "description": "Key scopes list", + "default": null, + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["name", "scopes"] + } + } + ] + }, + "delete": { + "summary": "Delete Key", + "operationId": "projectsDeleteKey", + "consumes": ["application/json"], + "produces": [], + "tags": ["projects"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteKey", + "weight": 139, + "cookies": false, + "type": "", + "demo": "projects/delete-key.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "keyId", + "description": "Key unique ID.", + "required": true, + "type": "string", + "x-example": "[KEY_ID]", + "in": "path" + } + ] + } + }, + "/projects/{projectId}/oauth2": { + "patch": { + "summary": "Update Project OAuth2", + "operationId": "projectsUpdateOAuth2", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { "$ref": "#/definitions/project" } + } + }, + "x-appwrite": { + "method": "updateOAuth2", + "weight": 126, + "cookies": false, + "type": "", + "demo": "projects/update-o-auth2.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Provider Name", + "default": null, + "x-example": "amazon" + }, + "appId": { + "type": "string", + "description": "Provider app ID. Max length: 256 chars.", + "default": "", + "x-example": "[APP_ID]" + }, + "secret": { + "type": "string", + "description": "Provider secret key. Max length: 512 chars.", + "default": "", + "x-example": "[SECRET]" + } + }, + "required": ["provider"] + } + } + ] + } + }, + "/projects/{projectId}/platforms": { + "get": { + "summary": "List Platforms", + "operationId": "projectsListPlatforms", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Platforms List", + "schema": { "$ref": "#/definitions/platformList" } + } + }, + "x-appwrite": { + "method": "listPlatforms", + "weight": 141, + "cookies": false, + "type": "", + "demo": "projects/list-platforms.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + } + ] + }, + "post": { + "summary": "Create Platform", + "operationId": "projectsCreatePlatform", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "201": { + "description": "Platform", + "schema": { "$ref": "#/definitions/platform" } + } + }, + "x-appwrite": { + "method": "createPlatform", + "weight": 140, + "cookies": false, + "type": "", + "demo": "projects/create-platform.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Platform type.", + "default": null, + "x-example": "web" + }, + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "key": { + "type": "string", + "description": "Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.", + "default": "", + "x-example": "[KEY]" + }, + "store": { + "type": "string", + "description": "App store or Google Play store ID. Max length: 256 chars.", + "default": "", + "x-example": "[STORE]" + }, + "hostname": { + "type": "string", + "description": "Platform client hostname. Max length: 256 chars.", + "default": "", + "x-example": "[HOSTNAME]" + } + }, + "required": ["type", "name"] + } + } + ] + } + }, + "/projects/{projectId}/platforms/{platformId}": { + "get": { + "summary": "Get Platform", + "operationId": "projectsGetPlatform", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Platform", + "schema": { "$ref": "#/definitions/platform" } + } + }, + "x-appwrite": { + "method": "getPlatform", + "weight": 142, + "cookies": false, + "type": "", + "demo": "projects/get-platform.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "platformId", + "description": "Platform unique ID.", + "required": true, + "type": "string", + "x-example": "[PLATFORM_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Platform", + "operationId": "projectsUpdatePlatform", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Platform", + "schema": { "$ref": "#/definitions/platform" } + } + }, + "x-appwrite": { + "method": "updatePlatform", + "weight": 143, + "cookies": false, + "type": "", + "demo": "projects/update-platform.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "platformId", + "description": "Platform unique ID.", + "required": true, + "type": "string", + "x-example": "[PLATFORM_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Platform name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "key": { + "type": "string", + "description": "Package name for android or bundle ID for iOS. Max length: 256 chars.", + "default": "", + "x-example": "[KEY]" + }, + "store": { + "type": "string", + "description": "App store or Google Play store ID. Max length: 256 chars.", + "default": "", + "x-example": "[STORE]" + }, + "hostname": { + "type": "string", + "description": "Platform client URL. Max length: 256 chars.", + "default": "", + "x-example": "[HOSTNAME]" + } + }, + "required": ["name"] + } + } + ] + }, + "delete": { + "summary": "Delete Platform", + "operationId": "projectsDeletePlatform", + "consumes": ["application/json"], + "produces": [], + "tags": ["projects"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deletePlatform", + "weight": 144, + "cookies": false, + "type": "", + "demo": "projects/delete-platform.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "platformId", + "description": "Platform unique ID.", + "required": true, + "type": "string", + "x-example": "[PLATFORM_ID]", + "in": "path" + } + ] + } + }, + "/projects/{projectId}/service": { + "patch": { + "summary": "Update service status", + "operationId": "projectsUpdateServiceStatus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Project", + "schema": { "$ref": "#/definitions/project" } + } + }, + "x-appwrite": { + "method": "updateServiceStatus", + "weight": 125, + "cookies": false, + "type": "", + "demo": "projects/update-service-status.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "service": { + "type": "string", + "description": "Service name.", + "default": null, + "x-example": "account" + }, + "status": { + "type": "boolean", + "description": "Service status.", + "default": null, + "x-example": false + } + }, + "required": ["service", "status"] + } + } + ] + } + }, + "/projects/{projectId}/usage": { + "get": { + "summary": "Get usage stats for a project", + "operationId": "projectsGetUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "UsageProject", + "schema": { "$ref": "#/definitions/usageProject" } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 123, + "cookies": false, + "type": "", + "demo": "projects/get-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "default": "30d", + "in": "query" + } + ] + } + }, + "/projects/{projectId}/webhooks": { + "get": { + "summary": "List Webhooks", + "operationId": "projectsListWebhooks", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Webhooks List", + "schema": { "$ref": "#/definitions/webhookList" } + } + }, + "x-appwrite": { + "method": "listWebhooks", + "weight": 131, + "cookies": false, + "type": "", + "demo": "projects/list-webhooks.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + } + ] + }, + "post": { + "summary": "Create Webhook", + "operationId": "projectsCreateWebhook", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "201": { + "description": "Webhook", + "schema": { "$ref": "#/definitions/webhook" } + } + }, + "x-appwrite": { + "method": "createWebhook", + "weight": 130, + "cookies": false, + "type": "", + "demo": "projects/create-webhook.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "events": { + "type": "array", + "description": "Events list.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "default": null, + "x-example": "https://example.com" + }, + "security": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": null, + "x-example": false + }, + "httpUser": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "[HTTP_USER]" + }, + "httpPass": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "[HTTP_PASS]" + } + }, + "required": ["name", "events", "url", "security"] + } + } + ] + } + }, + "/projects/{projectId}/webhooks/{webhookId}": { + "get": { + "summary": "Get Webhook", + "operationId": "projectsGetWebhook", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Webhook", + "schema": { "$ref": "#/definitions/webhook" } + } + }, + "x-appwrite": { + "method": "getWebhook", + "weight": 132, + "cookies": false, + "type": "", + "demo": "projects/get-webhook.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "webhookId", + "description": "Webhook unique ID.", + "required": true, + "type": "string", + "x-example": "[WEBHOOK_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Webhook", + "operationId": "projectsUpdateWebhook", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["projects"], + "description": "", + "responses": { + "200": { + "description": "Webhook", + "schema": { "$ref": "#/definitions/webhook" } + } + }, + "x-appwrite": { + "method": "updateWebhook", + "weight": 133, + "cookies": false, + "type": "", + "demo": "projects/update-webhook.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "webhookId", + "description": "Webhook unique ID.", + "required": true, + "type": "string", + "x-example": "[WEBHOOK_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Webhook name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "events": { + "type": "array", + "description": "Events list.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "url": { + "type": "string", + "description": "Webhook URL.", + "default": null, + "x-example": "https://example.com" + }, + "security": { + "type": "boolean", + "description": "Certificate verification, false for disabled or true for enabled.", + "default": null, + "x-example": false + }, + "httpUser": { + "type": "string", + "description": "Webhook HTTP user. Max length: 256 chars.", + "default": "", + "x-example": "[HTTP_USER]" + }, + "httpPass": { + "type": "string", + "description": "Webhook HTTP password. Max length: 256 chars.", + "default": "", + "x-example": "[HTTP_PASS]" + } + }, + "required": ["name", "events", "url", "security"] + } + } + ] + }, + "delete": { + "summary": "Delete Webhook", + "operationId": "projectsDeleteWebhook", + "consumes": ["application/json"], + "produces": [], + "tags": ["projects"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteWebhook", + "weight": 134, + "cookies": false, + "type": "", + "demo": "projects/delete-webhook.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "[PROJECT_ID]", + "in": "path" + }, + { + "name": "webhookId", + "description": "Webhook unique ID.", + "required": true, + "type": "string", + "x-example": "[WEBHOOK_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets": { + "get": { + "summary": "List buckets", + "operationId": "storageListBuckets", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Buckets List", + "schema": { "$ref": "#/definitions/bucketList" } + } + }, + "x-appwrite": { + "method": "listBuckets", + "weight": 151, + "cookies": false, + "type": "", + "demo": "storage/list-buckets.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-buckets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Results offset. The default value is 0. Use this param to manage pagination.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create bucket", + "operationId": "storageCreateBucket", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Create a new storage bucket.", + "responses": { + "201": { + "description": "Bucket", + "schema": { "$ref": "#/definitions/bucket" } + } + }, + "x-appwrite": { + "method": "createBucket", + "weight": 150, + "cookies": false, + "type": "", + "demo": "storage/create-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[BUCKET_ID]" + }, + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "file" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled?", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", + "default": 30000000, + "x-example": null + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + } + }, + "required": ["bucketId", "name", "permission"] + } + } + ] + } + }, + "/storage/buckets/{bucketId}": { + "get": { + "summary": "Get Bucket", + "operationId": "storageGetBucket", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "responses": { + "200": { + "description": "Bucket", + "schema": { "$ref": "#/definitions/bucket" } + } + }, + "x-appwrite": { + "method": "getBucket", + "weight": 152, + "cookies": false, + "type": "", + "demo": "storage/get-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Bucket", + "operationId": "storageUpdateBucket", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Update a storage bucket by its unique ID.", + "responses": { + "200": { + "description": "Bucket", + "schema": { "$ref": "#/definitions/bucket" } + } + }, + "x-appwrite": { + "method": "updateBucket", + "weight": 153, + "cookies": false, + "type": "", + "demo": "storage/update-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "file" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled?", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", + "default": null, + "x-example": null + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + } + }, + "required": ["name", "permission"] + } + } + ] + }, + "delete": { + "summary": "Delete Bucket", + "operationId": "storageDeleteBucket", + "consumes": ["application/json"], + "produces": [], + "tags": ["storage"], + "description": "Delete a storage bucket by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteBucket", + "weight": 154, + "cookies": false, + "type": "", + "demo": "storage/delete-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files": { + "get": { + "summary": "List Files", + "operationId": "storageListFiles", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Files List", + "schema": { "$ref": "#/definitions/fileList" } + } + }, + "x-appwrite": { + "method": "listFiles", + "weight": 156, + "cookies": false, + "type": "", + "demo": "storage/list-files.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create File", + "operationId": "storageCreateFile", + "consumes": ["multipart/form-data"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "createFile", + "weight": 155, + "cookies": false, + "type": "upload", + "demo": "storage/create-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "x-upload-id": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "formData" + }, + { + "name": "file", + "description": "Binary file.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "read", + "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "x-example": "[\"role:all\"]", + "in": "formData" + }, + { + "name": "write", + "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "x-example": "[\"role:all\"]", + "in": "formData" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}": { + "get": { + "summary": "Get File", + "operationId": "storageGetFile", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "getFile", + "weight": 157, + "cookies": false, + "type": "", + "demo": "storage/get-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update File", + "operationId": "storageUpdateFile", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "updateFile", + "weight": 161, + "cookies": false, + "type": "", + "demo": "storage/update-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete File", + "operationId": "storageDeleteFile", + "consumes": ["application/json"], + "produces": [], + "tags": ["storage"], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteFile", + "weight": 162, + "cookies": false, + "type": "", + "demo": "storage/delete-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/download": { + "get": { + "summary": "Get File for Download", + "operationId": "storageGetFileDownload", + "consumes": ["application/json"], + "produces": ["*/*"], + "tags": ["storage"], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { "description": "File", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFileDownload", + "weight": 159, + "cookies": false, + "type": "location", + "demo": "storage/get-file-download.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/preview": { + "get": { + "summary": "Get File Preview", + "operationId": "storageGetFilePreview", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["storage"], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFilePreview", + "weight": 158, + "cookies": false, + "type": "location", + "demo": "storage/get-file-preview.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "type": "string", + "x-example": "center", + "default": "center", + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpg", + "default": "", + "in": "query" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/view": { + "get": { + "summary": "Get File for View", + "operationId": "storageGetFileView", + "consumes": ["application/json"], + "produces": ["*/*"], + "tags": ["storage"], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { "description": "File", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFileView", + "weight": 160, + "cookies": false, + "type": "location", + "demo": "storage/get-file-view.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/storage/usage": { + "get": { + "summary": "Get usage stats for storage", + "operationId": "storageGetUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "", + "responses": { + "200": { + "description": "StorageUsage", + "schema": { "$ref": "#/definitions/usageStorage" } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 163, + "cookies": false, + "type": "", + "demo": "storage/get-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "default": "30d", + "in": "query" + } + ] + } + }, + "/storage/{bucketId}/usage": { + "get": { + "summary": "Get usage stats for a storage bucket", + "operationId": "storageGetBucketUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "", + "responses": { + "200": { + "description": "UsageBuckets", + "schema": { "$ref": "#/definitions/usageBuckets" } + } + }, + "x-appwrite": { + "method": "getBucketUsage", + "weight": 164, + "cookies": false, + "type": "", + "demo": "storage/get-bucket-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket ID.", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "default": "30d", + "in": "query" + } + ] + } + }, + "/teams": { + "get": { + "summary": "List Teams", + "operationId": "teamsList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Teams List", + "schema": { "$ref": "#/definitions/teamList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 166, + "cookies": false, + "type": "", + "demo": "teams/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-teams.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Team", + "operationId": "teamsCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 165, + "cookies": false, + "type": "", + "demo": "teams/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[TEAM_ID]" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", + "default": ["owner"], + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["teamId", "name"] + } + } + ] + } + }, + "/teams/{teamId}": { + "get": { + "summary": "Get Team", + "operationId": "teamsGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 167, + "cookies": false, + "type": "", + "demo": "teams/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Team", + "operationId": "teamsUpdate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Update a team using its ID. Only members with the owner role can update the team.", + "responses": { + "200": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "update", + "weight": 168, + "cookies": false, + "type": "", + "demo": "teams/update.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + }, + "delete": { + "summary": "Delete Team", + "operationId": "teamsDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["teams"], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 169, + "cookies": false, + "type": "", + "demo": "teams/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + } + ] + } + }, + "/teams/{teamId}/memberships": { + "get": { + "summary": "Get Team Memberships", + "operationId": "teamsGetMemberships", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { "$ref": "#/definitions/membershipList" } + } + }, + "x-appwrite": { + "method": "getMemberships", + "weight": 171, + "cookies": false, + "type": "", + "demo": "teams/get-memberships.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-members.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Team Membership", + "operationId": "teamsCreateMembership", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.", + "responses": { + "201": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "createMembership", + "weight": 170, + "cookies": false, + "type": "", + "demo": "teams/create-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "default": null, + "x-example": "email@example.com" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "[NAME]" + } + }, + "required": ["email", "roles", "url"] + } + } + ] + } + }, + "/teams/{teamId}/memberships/{membershipId}": { + "get": { + "summary": "Get Team Membership", + "operationId": "teamsGetMembership", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { "$ref": "#/definitions/membershipList" } + } + }, + "x-appwrite": { + "method": "getMembership", + "weight": 172, + "cookies": false, + "type": "", + "demo": "teams/get-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-member.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Membership Roles", + "operationId": "teamsUpdateMembershipRoles", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions).", + "responses": { + "200": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "updateMembershipRoles", + "weight": 173, + "cookies": false, + "type": "", + "demo": "teams/update-membership-roles.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-roles.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Max length for each role is 32 chars.", + "default": null, + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["roles"] + } + } + ] + }, + "delete": { + "summary": "Delete Team Membership", + "operationId": "teamsDeleteMembership", + "consumes": ["application/json"], + "produces": [], + "tags": ["teams"], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteMembership", + "weight": 175, + "cookies": false, + "type": "", + "demo": "teams/delete-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + } + ] + } + }, + "/teams/{teamId}/memberships/{membershipId}/status": { + "patch": { + "summary": "Update Team Membership Status", + "operationId": "teamsUpdateMembershipStatus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "updateMembershipStatus", + "weight": 174, + "cookies": false, + "type": "", + "demo": "teams/update-membership-status.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + }, + "/users": { + "get": { + "summary": "List Users", + "operationId": "usersList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Users List", + "schema": { "$ref": "#/definitions/userList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 177, + "cookies": false, + "type": "", + "demo": "users/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-users.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create User", + "operationId": "usersCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Create a new user.", + "responses": { + "201": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 176, + "cookies": false, + "type": "", + "demo": "users/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[USER_ID]" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "[NAME]" + } + }, + "required": ["userId", "email", "password"] + } + } + ] + } + }, + "/users/usage": { + "get": { + "summary": "Get usage stats for the users API", + "operationId": "usersGetUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "", + "responses": { + "200": { + "description": "UsageUsers", + "schema": { "$ref": "#/definitions/usageUsers" } + } + }, + "x-appwrite": { + "method": "getUsage", + "weight": 191, + "cookies": false, + "type": "", + "demo": "users/get-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["console"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [] }], + "parameters": [ + { + "name": "range", + "description": "Date range.", + "required": false, + "type": "string", + "x-example": "24h", + "default": "30d", + "in": "query" + }, + { + "name": "provider", + "description": "Provider Name.", + "required": false, + "type": "string", + "x-example": "email", + "default": "", + "in": "query" + } + ] + } + }, + "/users/{userId}": { + "get": { + "summary": "Get User", + "operationId": "usersGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get a user by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 178, + "cookies": false, + "type": "", + "demo": "users/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete User", + "operationId": "usersDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["users"], + "description": "Delete a user by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 190, + "cookies": false, + "type": "", + "demo": "users/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + } + }, + "/users/{userId}/email": { + "patch": { + "summary": "Update Email", + "operationId": "usersUpdateEmail", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user email by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 186, + "cookies": false, + "type": "", + "demo": "users/update-email.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + } + }, + "required": ["email"] + } + } + ] + } + }, + "/users/{userId}/logs": { + "get": { + "summary": "Get User Logs", + "operationId": "usersGetLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get the user activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { "$ref": "#/definitions/logList" } + } + }, + "x-appwrite": { + "method": "getLogs", + "weight": 181, + "cookies": false, + "type": "", + "demo": "users/get-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "/users/{userId}/name": { + "patch": { + "summary": "Update Name", + "operationId": "usersUpdateName", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user name by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 184, + "cookies": false, + "type": "", + "demo": "users/update-name.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + } + }, + "/users/{userId}/password": { + "patch": { + "summary": "Update Password", + "operationId": "usersUpdatePassword", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user password by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePassword", + "weight": 185, + "cookies": false, + "type": "", + "demo": "users/update-password.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["password"] + } + } + ] + } + }, + "/users/{userId}/prefs": { + "get": { + "summary": "Get User Preferences", + "operationId": "usersGetPrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "schema": { "$ref": "#/definitions/preferences" } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 179, + "cookies": false, + "type": "", + "demo": "users/get-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update User Preferences", + "operationId": "usersUpdatePrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { "$ref": "#/definitions/preferences" } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 187, + "cookies": false, + "type": "", + "demo": "users/update-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": ["prefs"] + } + } + ] + } + }, + "/users/{userId}/sessions": { + "get": { + "summary": "Get User Sessions", + "operationId": "usersGetSessions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get the user sessions list by its unique ID.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { "$ref": "#/definitions/sessionList" } + } + }, + "x-appwrite": { + "method": "getSessions", + "weight": 180, + "cookies": false, + "type": "", + "demo": "users/get-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete User Sessions", + "operationId": "usersDeleteSessions", + "consumes": ["application/json"], + "produces": [], + "tags": ["users"], + "description": "Delete all user's sessions by using the user's unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSessions", + "weight": 189, + "cookies": false, + "type": "", + "demo": "users/delete-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + } + }, + "/users/{userId}/sessions/{sessionId}": { + "delete": { + "summary": "Delete User Session", + "operationId": "usersDeleteSession", + "consumes": ["application/json"], + "produces": [], + "tags": ["users"], + "description": "Delete a user sessions by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSession", + "weight": 188, + "cookies": false, + "type": "", + "demo": "users/delete-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + } + }, + "/users/{userId}/status": { + "patch": { + "summary": "Update User Status", + "operationId": "usersUpdateStatus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateStatus", + "weight": 182, + "cookies": false, + "type": "", + "demo": "users/update-status.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "default": null, + "x-example": false + } + }, + "required": ["status"] + } + } + ] + } + }, + "/users/{userId}/verification": { + "patch": { + "summary": "Update Email Verification", + "operationId": "usersUpdateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateVerification", + "weight": 183, + "cookies": false, + "type": "", + "demo": "users/update-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "default": null, + "x-example": false + } + }, + "required": ["emailVerification"] + } + } + ] + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "database", + "description": "The Database service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + } + ], + "definitions": { + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { "type": "object", "$ref": "#/definitions/document" }, + "x-example": "" + } + }, + "required": ["total", "documents"] + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { "type": "object", "$ref": "#/definitions/collection" }, + "x-example": "" + } + }, + "required": ["total", "collections"] + }, + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { "type": "object", "$ref": "#/definitions/index" }, + "x-example": "" + } + }, + "required": ["total", "indexes"] + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "users": { + "type": "array", + "description": "List of users.", + "items": { "type": "object", "$ref": "#/definitions/user" }, + "x-example": "" + } + }, + "required": ["total", "users"] + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { "type": "object", "$ref": "#/definitions/session" }, + "x-example": "" + } + }, + "required": ["total", "sessions"] + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { "type": "object", "$ref": "#/definitions/log" }, + "x-example": "" + } + }, + "required": ["total", "logs"] + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { "type": "object", "$ref": "#/definitions/file" }, + "x-example": "" + } + }, + "required": ["total", "files"] + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { "type": "object", "$ref": "#/definitions/bucket" }, + "x-example": "" + } + }, + "required": ["total", "buckets"] + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { "type": "object", "$ref": "#/definitions/team" }, + "x-example": "" + } + }, + "required": ["total", "teams"] + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { "type": "object", "$ref": "#/definitions/membership" }, + "x-example": "" + } + }, + "required": ["total", "memberships"] + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "List of functions.", + "items": { "type": "object", "$ref": "#/definitions/function" }, + "x-example": "" + } + }, + "required": ["total", "functions"] + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { "type": "object", "$ref": "#/definitions/runtime" }, + "x-example": "" + } + }, + "required": ["total", "runtimes"] + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { "type": "object", "$ref": "#/definitions/deployment" }, + "x-example": "" + } + }, + "required": ["total", "deployments"] + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { "type": "object", "$ref": "#/definitions/execution" }, + "x-example": "" + } + }, + "required": ["total", "executions"] + }, + "projectList": { + "description": "Projects List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of projects documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "projects": { + "type": "array", + "description": "List of projects.", + "items": { "type": "object", "$ref": "#/definitions/project" }, + "x-example": "" + } + }, + "required": ["total", "projects"] + }, + "webhookList": { + "description": "Webhooks List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of webhooks documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "webhooks": { + "type": "array", + "description": "List of webhooks.", + "items": { "type": "object", "$ref": "#/definitions/webhook" }, + "x-example": "" + } + }, + "required": ["total", "webhooks"] + }, + "keyList": { + "description": "API Keys List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { "type": "object", "$ref": "#/definitions/key" }, + "x-example": "" + } + }, + "required": ["total", "keys"] + }, + "platformList": { + "description": "Platforms List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of platforms documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "platforms": { + "type": "array", + "description": "List of platforms.", + "items": { "type": "object", "$ref": "#/definitions/platform" }, + "x-example": "" + } + }, + "required": ["total", "platforms"] + }, + "domainList": { + "description": "Domains List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of domains documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "domains": { + "type": "array", + "description": "List of domains.", + "items": { "type": "object", "$ref": "#/definitions/domain" }, + "x-example": "" + } + }, + "required": ["total", "domains"] + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { "type": "object", "$ref": "#/definitions/country" }, + "x-example": "" + } + }, + "required": ["total", "countries"] + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { "type": "object", "$ref": "#/definitions/continent" }, + "x-example": "" + } + }, + "required": ["total", "continents"] + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { "type": "object", "$ref": "#/definitions/language" }, + "x-example": "" + } + }, + "required": ["total", "languages"] + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { "type": "object", "$ref": "#/definitions/currency" }, + "x-example": "" + } + }, + "required": ["total", "currencies"] + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { "type": "object", "$ref": "#/definitions/phone" }, + "x-example": "" + } + }, + "required": ["total", "phones"] + }, + "metricList": { + "description": "Metric List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of metrics documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "metrics": { + "type": "array", + "description": "List of metrics.", + "items": { "type": "object", "$ref": "#/definitions/metric" }, + "x-example": "" + } + }, + "required": ["total", "metrics"] + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "Collection read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "Collection write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled.", + "x-example": false + }, + "permission": { + "type": "string", + "description": "Collection permission model. Possible values: `document` or `collection`", + "x-example": "document" + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "x-anyOf": [ + { "$ref": "#/definitions/attributeBoolean" }, + { "$ref": "#/definitions/attributeInteger" }, + { "$ref": "#/definitions/attributeFloat" }, + { "$ref": "#/definitions/attributeEmail" }, + { "$ref": "#/definitions/attributeEnum" }, + { "$ref": "#/definitions/attributeUrl" }, + { "$ref": "#/definitions/attributeIp" }, + { "$ref": "#/definitions/attributeString" } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { "type": "object", "$ref": "#/definitions/index" }, + "x-example": {} + } + }, + "required": [ + "$id", + "$read", + "$write", + "name", + "enabled", + "permission", + "attributes", + "indexes" + ] + }, + "attributeList": { + "description": "Attributes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of attributes in the given collection.", + "x-example": 5, + "format": "int32" + }, + "attributes": { + "type": "array", + "description": "List of attributes.", + "items": { + "x-anyOf": [ + { "$ref": "#/definitions/attributeBoolean" }, + { "$ref": "#/definitions/attributeInteger" }, + { "$ref": "#/definitions/attributeFloat" }, + { "$ref": "#/definitions/attributeEmail" }, + { "$ref": "#/definitions/attributeEnum" }, + { "$ref": "#/definitions/attributeUrl" }, + { "$ref": "#/definitions/attributeIp" }, + { "$ref": "#/definitions/attributeString" } + ] + }, + "x-example": "" + } + }, + "required": ["total", "attributes"] + }, + "attributeString": { + "description": "AttributeString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "size"] + }, + "attributeInteger": { + "description": "AttributeInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required"] + }, + "attributeFloat": { + "description": "AttributeFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required"] + }, + "attributeBoolean": { + "description": "AttributeBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required"] + }, + "attributeEmail": { + "description": "AttributeEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "format"] + }, + "attributeEnum": { + "description": "AttributeEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { "type": "string" }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "elements", "format"] + }, + "attributeIp": { + "description": "AttributeIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "format"] + }, + "attributeUrl": { + "description": "AttributeURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "http://example.com", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "format"] + }, + "index": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { "type": "string" }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { "type": "string" }, + "x-example": [] + } + }, + "required": ["key", "type", "status", "attributes", "orders"] + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$collection": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e" + }, + "$read": { + "type": "array", + "description": "Document read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "Document write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + } + }, + "additionalProperties": true, + "required": ["$id", "$collection", "$read", "$write"] + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User Email.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "integer", + "description": "Log creation time in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ] + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "registration": { + "type": "integer", + "description": "User registration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "passwordUpdate": { + "type": "integer", + "description": "Unix timestamp of the most recent password update", + "x-example": 1592981250, + "format": "int32" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { "theme": "pink", "timezone": "UTC" }, + "items": { "type": "object", "$ref": "#/definitions/preferences" } + } + }, + "required": [ + "$id", + "name", + "registration", + "status", + "passwordUpdate", + "email", + "emailVerification", + "prefs" + ] + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "integer", + "description": "Session expiration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "integer", + "description": "Date, the Unix timestamp of when the access token expires.", + "x-example": 1592981250, + "format": "int32" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current" + ] + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "integer", + "description": "Token expiration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + } + }, + "required": ["$id", "userId", "secret", "expire"] + }, + "jwt": { + "description": "JWT", + "type": "object", + "properties": { + "jwt": { + "type": "string", + "description": "JWT encoded string.", + "x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + } + }, + "required": ["jwt"] + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the Europian Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ] + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "File read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "File write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "dateCreated": { + "type": "integer", + "description": "File creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + } + }, + "required": [ + "$id", + "bucketId", + "$read", + "$write", + "name", + "dateCreated", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded" + ] + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "File read permissions.", + "items": { "type": "string" }, + "x-example": ["role:all"] + }, + "$write": { + "type": "array", + "description": "File write permissions.", + "items": { "type": "string" }, + "x-example": ["user:608f9da25e7e1"] + }, + "permission": { + "type": "string", + "description": "Bucket permission model. Possible values: `bucket` or `file`", + "x-example": "file" + }, + "dateCreated": { + "type": "integer", + "description": "Bucket creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "dateUpdated": { + "type": "integer", + "description": "Bucket update date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "name": { + "type": "string", + "description": "Bucket name.", + "x-example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size supported.", + "x-example": 100, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { "type": "string" }, + "x-example": ["jpg", "png"] + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + } + }, + "required": [ + "$id", + "$read", + "$write", + "permission", + "dateCreated", + "dateUpdated", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "encryption", + "antivirus" + ] + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "dateCreated": { + "type": "integer", + "description": "Team creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + } + }, + "required": ["$id", "name", "dateCreated", "total"] + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "VIP" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "invited": { + "type": "integer", + "description": "Date, the user has been invited to join the team in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "joined": { + "type": "integer", + "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { "type": "string" }, + "x-example": "admin" + } + }, + "required": [ + "$id", + "userId", + "teamId", + "name", + "email", + "invited", + "joined", + "confirm", + "roles" + ] + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { "type": "string" }, + "x-example": "role:member" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "dateCreated": { + "type": "integer", + "description": "Function creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "dateUpdated": { + "type": "integer", + "description": "Function update date in Unix timestamp.", + "x-example": 1592981257, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Function status. Possible values: `disabled`, `enabled`", + "x-example": "enabled" + }, + "runtime": { + "type": "string", + "description": "Function execution runtime.", + "x-example": "python-3.8" + }, + "deployment": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "vars": { + "type": "object", + "additionalProperties": true, + "description": "Function environment variables.", + "x-example": { "key": "value" } + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { "type": "string" }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedult in CRON format.", + "x-example": "5 4 * * *" + }, + "scheduleNext": { + "type": "integer", + "description": "Function next scheduled execution date in Unix timestamp.", + "x-example": 1592981292, + "format": "int32" + }, + "schedulePrevious": { + "type": "integer", + "description": "Function next scheduled execution date in Unix timestamp.", + "x-example": 1592981237, + "format": "int32" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 1592981237, + "format": "int32" + } + }, + "required": [ + "$id", + "execute", + "name", + "dateCreated", + "dateUpdated", + "status", + "runtime", + "deployment", + "vars", + "events", + "schedule", + "scheduleNext", + "schedulePrevious", + "timeout" + ] + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "Python" + }, + "version": { + "type": "string", + "description": "Runtime version.", + "x-example": "3.8" + }, + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "x-example": "python:3.8-alpine" + }, + "image": { + "type": "string", + "description": "Image name of Docker Hub.", + "x-example": "appwrite\\/runtime-for-python:3.8" + }, + "logo": { + "type": "string", + "description": "Name of the logo image.", + "x-example": "python.png" + }, + "supports": { + "type": "array", + "description": "List of supported architectures.", + "items": { "type": "string" }, + "x-example": "amd64" + } + }, + "required": [ + "$id", + "name", + "version", + "base", + "image", + "logo", + "supports" + ] + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "dateCreated": { + "type": "integer", + "description": "The deployment creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "enabled" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildId": { + "type": "string", + "description": "The current build ID.", + "x-example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "x-example": true + }, + "status": { + "type": "string", + "description": "The deployment status.", + "x-example": "enabled" + }, + "buildStdout": { + "type": "string", + "description": "The build stdout.", + "x-example": "enabled" + }, + "buildStderr": { + "type": "string", + "description": "The build stderr.", + "x-example": "enabled" + } + }, + "required": [ + "$id", + "resourceId", + "resourceType", + "dateCreated", + "entrypoint", + "size", + "buildId", + "activate", + "status", + "buildStdout", + "buildStderr" + ] + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "Execution read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "dateCreated": { + "type": "integer", + "description": "The execution creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http" + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", + "x-example": "processing" + }, + "statusCode": { + "type": "integer", + "description": "The script status code.", + "x-example": 0, + "format": "int32" + }, + "stdout": { + "type": "string", + "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", + "x-example": "" + }, + "stderr": { + "type": "string", + "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", + "x-example": "" + }, + "time": { + "type": "number", + "description": "The script execution time in seconds.", + "x-example": 0.4, + "format": "double" + } + }, + "required": [ + "$id", + "$read", + "functionId", + "dateCreated", + "trigger", + "status", + "statusCode", + "stdout", + "stderr", + "time" + ] + }, + "project": { + "description": "Project", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Project ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Project name.", + "x-example": "New Project" + }, + "description": { + "type": "string", + "description": "Project description.", + "x-example": "This is a new project." + }, + "teamId": { + "type": "string", + "description": "Project team ID.", + "x-example": "1592981250" + }, + "logo": { + "type": "string", + "description": "Project logo file ID.", + "x-example": "5f5c451b403cb" + }, + "url": { + "type": "string", + "description": "Project website URL.", + "x-example": "5f5c451b403cb" + }, + "legalName": { + "type": "string", + "description": "Company legal name.", + "x-example": "Company LTD." + }, + "legalCountry": { + "type": "string", + "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format.", + "x-example": "US" + }, + "legalState": { + "type": "string", + "description": "State name.", + "x-example": "New York" + }, + "legalCity": { + "type": "string", + "description": "City name.", + "x-example": "New York City." + }, + "legalAddress": { + "type": "string", + "description": "Company Address.", + "x-example": "620 Eighth Avenue, New York, NY 10018" + }, + "legalTaxId": { + "type": "string", + "description": "Company Tax ID.", + "x-example": "131102020" + }, + "authLimit": { + "type": "integer", + "description": "Max users allowed. 0 is unlimited.", + "x-example": 100, + "format": "int32" + }, + "platforms": { + "type": "array", + "description": "List of Platforms.", + "items": { "type": "object", "$ref": "#/definitions/platform" }, + "x-example": {} + }, + "webhooks": { + "type": "array", + "description": "List of Webhooks.", + "items": { "type": "object", "$ref": "#/definitions/webhook" }, + "x-example": {} + }, + "keys": { + "type": "array", + "description": "List of API Keys.", + "items": { "type": "object", "$ref": "#/definitions/key" }, + "x-example": {} + }, + "domains": { + "type": "array", + "description": "List of Domains.", + "items": { "type": "object", "$ref": "#/definitions/domain" }, + "x-example": {} + }, + "providerAmazonAppid": { + "type": "string", + "description": "Amazon OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerAmazonSecret": { + "type": "string", + "description": "Amazon OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerAppleAppid": { + "type": "string", + "description": "Apple OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerAppleSecret": { + "type": "string", + "description": "Apple OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerBitbucketAppid": { + "type": "string", + "description": "BitBucket OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerBitbucketSecret": { + "type": "string", + "description": "BitBucket OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerBitlyAppid": { + "type": "string", + "description": "Bitly OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerBitlySecret": { + "type": "string", + "description": "Bitly OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerBoxAppid": { + "type": "string", + "description": "Box OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerBoxSecret": { + "type": "string", + "description": "Box OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerDiscordAppid": { + "type": "string", + "description": "Discord OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerDiscordSecret": { + "type": "string", + "description": "Discord OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerDropboxAppid": { + "type": "string", + "description": "Dropbox OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerDropboxSecret": { + "type": "string", + "description": "Dropbox OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerFacebookAppid": { + "type": "string", + "description": "Facebook OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerFacebookSecret": { + "type": "string", + "description": "Facebook OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerGithubAppid": { + "type": "string", + "description": "GitHub OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerGithubSecret": { + "type": "string", + "description": "GitHub OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerGitlabAppid": { + "type": "string", + "description": "GitLab OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerGitlabSecret": { + "type": "string", + "description": "GitLab OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerGoogleAppid": { + "type": "string", + "description": "Google OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerGoogleSecret": { + "type": "string", + "description": "Google OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerLinkedinAppid": { + "type": "string", + "description": "LinkedIn OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerLinkedinSecret": { + "type": "string", + "description": "LinkedIn OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerMicrosoftAppid": { + "type": "string", + "description": "Microsoft OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerMicrosoftSecret": { + "type": "string", + "description": "Microsoft OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerNotionAppid": { + "type": "string", + "description": "Notion OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerNotionSecret": { + "type": "string", + "description": "Notion OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerPaypalAppid": { + "type": "string", + "description": "PayPal OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerPaypalSecret": { + "type": "string", + "description": "PayPal OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerPaypalSandboxAppid": { + "type": "string", + "description": "PayPal OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerPaypalSandboxSecret": { + "type": "string", + "description": "PayPal OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerSalesforceAppid": { + "type": "string", + "description": "Salesforce OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerSalesforceSecret": { + "type": "string", + "description": "Salesforce OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerSlackAppid": { + "type": "string", + "description": "Slack OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerSlackSecret": { + "type": "string", + "description": "Slack OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerSpotifyAppid": { + "type": "string", + "description": "Spotify OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerSpotifySecret": { + "type": "string", + "description": "Spotify OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerTradeshiftAppid": { + "type": "string", + "description": "Tradeshift OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerTradeshiftSecret": { + "type": "string", + "description": "Tradeshift OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerTradeshiftBoxAppid": { + "type": "string", + "description": "Tradeshift OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerTradeshiftBoxSecret": { + "type": "string", + "description": "Tradeshift OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerTwitchAppid": { + "type": "string", + "description": "Twitch OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerTwitchSecret": { + "type": "string", + "description": "Twitch OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerVkAppid": { + "type": "string", + "description": "VK OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerVkSecret": { + "type": "string", + "description": "VK OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerZoomAppid": { + "type": "string", + "description": "Zoom OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerZoomSecret": { + "type": "string", + "description": "Zoom OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerYahooAppid": { + "type": "string", + "description": "Yahoo OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerYahooSecret": { + "type": "string", + "description": "Yahoo OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerYammerAppid": { + "type": "string", + "description": "Yammer OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerYammerSecret": { + "type": "string", + "description": "Yammer OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerYandexAppid": { + "type": "string", + "description": "Yandex OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerYandexSecret": { + "type": "string", + "description": "Yandex OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerWordpressAppid": { + "type": "string", + "description": "WordPress OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerWordpressSecret": { + "type": "string", + "description": "WordPress OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerStripeAppid": { + "type": "string", + "description": "Stripe OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerStripeSecret": { + "type": "string", + "description": "Stripe OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "providerMockAppid": { + "type": "string", + "description": "Mock OAuth app ID.", + "x-example": "123247283472834787438" + }, + "providerMockSecret": { + "type": "string", + "description": "Mock OAuth secret ID.", + "x-example": "djsgudsdsewe43434343dd34..." + }, + "authEmailPassword": { + "type": "boolean", + "description": "Email/Password auth method status", + "x-example": true + }, + "authUsersAuthMagicURL": { + "type": "boolean", + "description": "Magic URL auth method status", + "x-example": true + }, + "authAnonymous": { + "type": "boolean", + "description": "Anonymous auth method status", + "x-example": true + }, + "authInvites": { + "type": "boolean", + "description": "Invites auth method status", + "x-example": true + }, + "authJWT": { + "type": "boolean", + "description": "JWT auth method status", + "x-example": true + }, + "authPhone": { + "type": "boolean", + "description": "Phone auth method status", + "x-example": true + }, + "serviceStatusForAccount": { + "type": "boolean", + "description": "Account service status", + "x-example": true + }, + "serviceStatusForAvatars": { + "type": "boolean", + "description": "Avatars service status", + "x-example": true + }, + "serviceStatusForDatabase": { + "type": "boolean", + "description": "Database service status", + "x-example": true + }, + "serviceStatusForLocale": { + "type": "boolean", + "description": "Locale service status", + "x-example": true + }, + "serviceStatusForHealth": { + "type": "boolean", + "description": "Health service status", + "x-example": true + }, + "serviceStatusForStorage": { + "type": "boolean", + "description": "Storage service status", + "x-example": true + }, + "serviceStatusForTeams": { + "type": "boolean", + "description": "Teams service status", + "x-example": true + }, + "serviceStatusForUsers": { + "type": "boolean", + "description": "Users service status", + "x-example": true + }, + "serviceStatusForFunctions": { + "type": "boolean", + "description": "Functions service status", + "x-example": true + } + }, + "required": [ + "$id", + "name", + "description", + "teamId", + "logo", + "url", + "legalName", + "legalCountry", + "legalState", + "legalCity", + "legalAddress", + "legalTaxId", + "authLimit", + "platforms", + "webhooks", + "keys", + "domains", + "providerAmazonAppid", + "providerAmazonSecret", + "providerAppleAppid", + "providerAppleSecret", + "providerBitbucketAppid", + "providerBitbucketSecret", + "providerBitlyAppid", + "providerBitlySecret", + "providerBoxAppid", + "providerBoxSecret", + "providerDiscordAppid", + "providerDiscordSecret", + "providerDropboxAppid", + "providerDropboxSecret", + "providerFacebookAppid", + "providerFacebookSecret", + "providerGithubAppid", + "providerGithubSecret", + "providerGitlabAppid", + "providerGitlabSecret", + "providerGoogleAppid", + "providerGoogleSecret", + "providerLinkedinAppid", + "providerLinkedinSecret", + "providerMicrosoftAppid", + "providerMicrosoftSecret", + "providerNotionAppid", + "providerNotionSecret", + "providerPaypalAppid", + "providerPaypalSecret", + "providerPaypalSandboxAppid", + "providerPaypalSandboxSecret", + "providerSalesforceAppid", + "providerSalesforceSecret", + "providerSlackAppid", + "providerSlackSecret", + "providerSpotifyAppid", + "providerSpotifySecret", + "providerTradeshiftAppid", + "providerTradeshiftSecret", + "providerTradeshiftBoxAppid", + "providerTradeshiftBoxSecret", + "providerTwitchAppid", + "providerTwitchSecret", + "providerVkAppid", + "providerVkSecret", + "providerZoomAppid", + "providerZoomSecret", + "providerYahooAppid", + "providerYahooSecret", + "providerYammerAppid", + "providerYammerSecret", + "providerYandexAppid", + "providerYandexSecret", + "providerWordpressAppid", + "providerWordpressSecret", + "providerStripeAppid", + "providerStripeSecret", + "providerMockAppid", + "providerMockSecret", + "authEmailPassword", + "authUsersAuthMagicURL", + "authAnonymous", + "authInvites", + "authJWT", + "authPhone", + "serviceStatusForAccount", + "serviceStatusForAvatars", + "serviceStatusForDatabase", + "serviceStatusForLocale", + "serviceStatusForHealth", + "serviceStatusForStorage", + "serviceStatusForTeams", + "serviceStatusForUsers", + "serviceStatusForFunctions" + ] + }, + "webhook": { + "description": "Webhook", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Webhook ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Webhook name.", + "x-example": "My Webhook" + }, + "url": { + "type": "string", + "description": "Webhook URL endpoint.", + "x-example": "https://example.com/webhook" + }, + "events": { + "type": "array", + "description": "Webhook trigger events.", + "items": { "type": "string" }, + "x-example": "database.collections.update" + }, + "security": { + "type": "boolean", + "description": "Indicated if SSL / TLS Certificate verification is enabled.", + "x-example": true + }, + "httpUser": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "httpPass": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + } + }, + "required": [ + "$id", + "name", + "url", + "events", + "security", + "httpUser", + "httpPass" + ] + }, + "key": { + "description": "Key", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Key ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Key name.", + "x-example": "My API Key" + }, + "scopes": { + "type": "array", + "description": "Allowed permission scopes.", + "items": { "type": "string" }, + "x-example": "users.read" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "x-example": "919c2d18fb5d4...a2ae413da83346ad2" + } + }, + "required": ["$id", "name", "scopes", "secret"] + }, + "domain": { + "description": "Domain", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Domain ID.", + "x-example": "5e5ea5c16897e" + }, + "domain": { + "type": "string", + "description": "Domain name.", + "x-example": "appwrite.company.com" + }, + "registerable": { + "type": "string", + "description": "Registerable domain name.", + "x-example": "company.com" + }, + "tld": { + "type": "string", + "description": "TLD name.", + "x-example": "com" + }, + "verification": { + "type": "boolean", + "description": "Verification process status.", + "x-example": true + }, + "certificateId": { + "type": "string", + "description": "Certificate ID.", + "x-example": "6ejea5c13377e" + } + }, + "required": [ + "$id", + "domain", + "registerable", + "tld", + "verification", + "certificateId" + ] + }, + "platform": { + "description": "Platform", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Platform ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Platform name.", + "x-example": "My Web App" + }, + "type": { + "type": "string", + "description": "Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.", + "x-example": "My Web App" + }, + "key": { + "type": "string", + "description": "Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.", + "x-example": "com.company.appname" + }, + "store": { + "type": "string", + "description": "App store or Google Play store ID.", + "x-example": "" + }, + "hostname": { + "type": "string", + "description": "Web app hostname. Empty string for other platforms.", + "x-example": true + }, + "httpUser": { + "type": "string", + "description": "HTTP basic authentication username.", + "x-example": "username" + }, + "httpPass": { + "type": "string", + "description": "HTTP basic authentication password.", + "x-example": "password" + } + }, + "required": [ + "$id", + "name", + "type", + "key", + "store", + "hostname", + "httpUser", + "httpPass" + ] + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": ["name", "code"] + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": ["name", "code"] + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": ["name", "code", "nativeName"] + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ] + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": ["code", "countryCode", "countryName"] + }, + "healthAntivirus": { + "description": "Health Antivirus", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Antivirus version.", + "x-example": "1.0.0" + }, + "status": { + "type": "string", + "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "x-example": "online" + } + }, + "required": ["version", "status"] + }, + "healthQueue": { + "description": "Health Queue", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Amount of actions in the queue.", + "x-example": 8, + "format": "int32" + } + }, + "required": ["size"] + }, + "healthStatus": { + "description": "Health Status", + "type": "object", + "properties": { + "ping": { + "type": "integer", + "description": "Duration in milliseconds how long the health check took.", + "x-example": 128, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Service status. Possible values can are: `pass`, `fail`", + "x-example": "pass" + } + }, + "required": ["ping", "status"] + }, + "healthTime": { + "description": "Health Time", + "type": "object", + "properties": { + "remoteTime": { + "type": "integer", + "description": "Current unix timestamp on trustful remote server.", + "x-example": 1639490751, + "format": "int32" + }, + "localTime": { + "type": "integer", + "description": "Current unix timestamp of local server where Appwrite runs.", + "x-example": 1639490844, + "format": "int32" + }, + "diff": { + "type": "integer", + "description": "Difference of unix remote and local timestamps in milliseconds.", + "x-example": 93, + "format": "int32" + } + }, + "required": ["remoteTime", "localTime", "diff"] + }, + "usageDatabase": { + "description": "UsageDatabase", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "documentsCount": { + "type": "array", + "description": "Aggregated stats for total number of documents.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "collectionsCount": { + "type": "array", + "description": "Aggregated stats for total number of collections.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsCreate": { + "type": "array", + "description": "Aggregated stats for documents created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsRead": { + "type": "array", + "description": "Aggregated stats for documents read.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsUpdate": { + "type": "array", + "description": "Aggregated stats for documents updated.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsDelete": { + "type": "array", + "description": "Aggregated stats for documents deleted.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "collectionsCreate": { + "type": "array", + "description": "Aggregated stats for collections created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "collectionsRead": { + "type": "array", + "description": "Aggregated stats for collections read.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "collectionsUpdate": { + "type": "array", + "description": "Aggregated stats for collections updated.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "collectionsDelete": { + "type": "array", + "description": "Aggregated stats for collections delete.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + } + }, + "required": [ + "range", + "documentsCount", + "collectionsCount", + "documentsCreate", + "documentsRead", + "documentsUpdate", + "documentsDelete", + "collectionsCreate", + "collectionsRead", + "collectionsUpdate", + "collectionsDelete" + ] + }, + "usageCollection": { + "description": "UsageCollection", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "documentsCount": { + "type": "array", + "description": "Aggregated stats for total number of documents.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsCreate": { + "type": "array", + "description": "Aggregated stats for documents created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsRead": { + "type": "array", + "description": "Aggregated stats for documents read.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsUpdate": { + "type": "array", + "description": "Aggregated stats for documents updated.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documentsDelete": { + "type": "array", + "description": "Aggregated stats for documents deleted.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + } + }, + "required": [ + "range", + "documentsCount", + "documentsCreate", + "documentsRead", + "documentsUpdate", + "documentsDelete" + ] + }, + "usageUsers": { + "description": "UsageUsers", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "usersCount": { + "type": "array", + "description": "Aggregated stats for total number of users.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "usersCreate": { + "type": "array", + "description": "Aggregated stats for users created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "usersRead": { + "type": "array", + "description": "Aggregated stats for users read.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "usersUpdate": { + "type": "array", + "description": "Aggregated stats for users updated.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "usersDelete": { + "type": "array", + "description": "Aggregated stats for users deleted.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "sessionsCreate": { + "type": "array", + "description": "Aggregated stats for sessions created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "sessionsProviderCreate": { + "type": "array", + "description": "Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "sessionsDelete": { + "type": "array", + "description": "Aggregated stats for sessions deleted.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + } + }, + "required": [ + "range", + "usersCount", + "usersCreate", + "usersRead", + "usersUpdate", + "usersDelete", + "sessionsCreate", + "sessionsProviderCreate", + "sessionsDelete" + ] + }, + "usageStorage": { + "description": "StorageUsage", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "filesStorage": { + "type": "array", + "description": "Aggregated stats for the occupied storage size by files (in bytes).", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "tagsStorage": { + "type": "array", + "description": "Aggregated stats for the occupied storage size by tags (in bytes).", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesCount": { + "type": "array", + "description": "Aggregated stats for total number of files.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "bucketsCount": { + "type": "array", + "description": "Aggregated stats for total number of buckets.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "bucketsCreate": { + "type": "array", + "description": "Aggregated stats for buckets created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "bucketsRead": { + "type": "array", + "description": "Aggregated stats for buckets read.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "bucketsUpdate": { + "type": "array", + "description": "Aggregated stats for buckets updated.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "bucketsDelete": { + "type": "array", + "description": "Aggregated stats for buckets deleted.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesCreate": { + "type": "array", + "description": "Aggregated stats for files created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesRead": { + "type": "array", + "description": "Aggregated stats for files read.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesUpdate": { + "type": "array", + "description": "Aggregated stats for files updated.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesDelete": { + "type": "array", + "description": "Aggregated stats for files deleted.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + } + }, + "required": [ + "range", + "filesStorage", + "tagsStorage", + "filesCount", + "bucketsCount", + "bucketsCreate", + "bucketsRead", + "bucketsUpdate", + "bucketsDelete", + "filesCreate", + "filesRead", + "filesUpdate", + "filesDelete" + ] + }, + "usageBuckets": { + "description": "UsageBuckets", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "filesCount": { + "type": "array", + "description": "Aggregated stats for total number of files in this bucket.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesStorage": { + "type": "array", + "description": "Aggregated stats for total storage of files in this bucket.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesCreate": { + "type": "array", + "description": "Aggregated stats for files created.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesRead": { + "type": "array", + "description": "Aggregated stats for files read.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesUpdate": { + "type": "array", + "description": "Aggregated stats for files updated.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "filesDelete": { + "type": "array", + "description": "Aggregated stats for files deleted.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + } + }, + "required": [ + "range", + "filesCount", + "filesStorage", + "filesCreate", + "filesRead", + "filesUpdate", + "filesDelete" + ] + }, + "usageFunctions": { + "description": "UsageFunctions", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "functionsExecutions": { + "type": "array", + "description": "Aggregated stats for function executions.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "functionsFailures": { + "type": "array", + "description": "Aggregated stats for function execution failures.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "functionsCompute": { + "type": "array", + "description": "Aggregated stats for function execution duration.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + } + }, + "required": [ + "range", + "functionsExecutions", + "functionsFailures", + "functionsCompute" + ] + }, + "usageProject": { + "description": "UsageProject", + "type": "object", + "properties": { + "range": { + "type": "string", + "description": "The time range of the usage stats.", + "x-example": "30d" + }, + "requests": { + "type": "array", + "description": "Aggregated stats for number of requests.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "network": { + "type": "array", + "description": "Aggregated stats for consumed bandwidth.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "functions": { + "type": "array", + "description": "Aggregated stats for function executions.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "documents": { + "type": "array", + "description": "Aggregated stats for number of documents.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "collections": { + "type": "array", + "description": "Aggregated stats for number of collections.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "users": { + "type": "array", + "description": "Aggregated stats for number of users.", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + }, + "storage": { + "type": "array", + "description": "Aggregated stats for the occupied storage size (in bytes).", + "items": { "type": "object", "$ref": "#/definitions/metricList" }, + "x-example": {} + } + }, + "required": [ + "range", + "requests", + "network", + "functions", + "documents", + "collections", + "users", + "storage" + ] + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https://appwrite.io/docs" + } +} diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f689255c56..1a3b0de6bc 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1 +1,9048 @@ -{"swagger":"2.0","info":{"version":"0.13.4","title":"Appwrite","description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https:\/\/appwrite.io\/docs](https:\/\/appwrite.io\/docs)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":47,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete Account","operationId":"accountDelete","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":56,"cookies":false,"type":"","demo":"account\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":54,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["email","password"]}}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":50,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":52,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":53,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":48,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":55,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT \/account\/recovery](\/docs\/client\/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":60,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST \/account\/recovery](\/docs\/client\/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":61,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":49,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":59,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":51,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":58,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":57,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](\/docs\/client\/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":62,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":63,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user \/account\/sessions endpoint. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":65,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":64,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":68,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":66,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"type":"string","x-example":"af","in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"quality","description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":67,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"type":"string","format":"url","x-example":"https:\/\/example.com","in":"query"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 2000.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":70,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":69,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"type":"string","x-example":"[TEXT]","in":"query"},{"name":"size","description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":0,"default":400,"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"type":"integer","format":"int32","x-example":0,"default":1,"in":"query"},{"name":"download","description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.","required":false,"type":"boolean","x-example":false,"default":false,"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":72,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":71,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}]}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":73,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":77,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"document"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":78,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":87,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":80,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":81,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size.","default":null,"x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":85,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":84,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","default":null,"x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","default":null,"x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":82,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":79,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","default":null,"x-example":1},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":83,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","default":null,"x-example":null},"required":{"type":"boolean","description":"Is attribute required?","default":null,"x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":88,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":89,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":95,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents).","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"limit","description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"},{"name":"orderTypes","description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](\/docs\/server\/database#databaseCreateCollection) API or directly from your database console.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":94,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection). Make sure to define attributes before creating documents.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":96,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":98,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":99,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"documentId","description":"Document ID.","required":true,"type":"string","x-example":"[DOCUMENT_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":91,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":90,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":92,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":93,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"key","description":"Index Key.","required":true,"type":"string","in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function. You can pass a list of [permissions](\/docs\/permissions) to allow different project users or team with access to execute the function using the client API.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","default":null,"x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":194,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":195,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":197,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"execute":{"type":"array","description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","default":[],"x-example":"{}"},"events":{"type":"array","description":"Events list.","default":[],"x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","default":"","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","default":15,"x-example":1}},"required":["name","execute"]}}]},"delete":{"summary":"Delete Function","operationId":"functionsDelete","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":199,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":201,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["functions"],"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](\/docs\/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":200,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"code","description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.","required":true,"type":"file","in":"formData"},{"name":"activate","description":"Automatically activate the deployment when it is finished building.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":202,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":198,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":203,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":207,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":205,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"cursor","description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":204,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":206,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":118,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":110,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":109,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":115,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":116,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":113,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/usage":{"get":{"summary":"Get Usage Queue","operationId":"healthGetQueueUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueUsage","weight":114,"cookies":false,"type":"","demo":"health\/get-queue-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-usage.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":112,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":117,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":111,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https:\/\/db-ip.com))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":100,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":104,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":101,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":102,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":103,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":105,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":106,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":151,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Results offset. The default value is 0. Use this param to manage pagination.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":150,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":30000000,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["bucketId","name","permission"]}}]}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":152,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":153,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","default":null,"x-example":"[NAME]"},"permission":{"type":"string","description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"file"},"read":{"type":"array","description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","default":true,"x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs\/environment-variables#storage)","default":null,"x-example":null},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions","default":[],"x-example":null,"items":{"type":"string"}},"encryption":{"type":"boolean","description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled","default":true,"x-example":false},"antivirus":{"type":"boolean","description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled","default":true,"x-example":false}},"required":["name","permission"]}}]},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":154,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":156,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","consumes":["multipart\/form-data"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](\/docs\/server\/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":155,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","required":true,"x-upload-id":true,"type":"string","x-example":"[FILE_ID]","in":"formData"},{"name":"file","description":"Binary file.","required":true,"type":"file","in":"formData"},{"name":"read","description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"},{"name":"write","description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"x-example":"[\"role:all\"]","in":"formData"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":157,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":161,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"read":{"type":"array","description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}},"write":{"type":"array","description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}}}}]},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","consumes":["application\/json"],"produces":[],"tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":162,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":159,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":158,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"height","description":"Resize preview image height, Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"gravity","description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right","required":false,"type":"string","x-example":"center","default":"center","in":"query"},{"name":"quality","description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.","required":false,"type":"integer","format":"int32","x-example":0,"default":100,"in":"query"},{"name":"borderWidth","description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"borderColor","description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"opacity","description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.","required":false,"type":"number","format":"float","x-example":0,"default":1,"in":"query"},{"name":"rotation","description":"Preview image rotation in degrees. Pass an integer between -360 and 360.","required":false,"type":"integer","format":"int32","x-example":-360,"default":0,"in":"query"},{"name":"background","description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.","required":false,"type":"string","default":"","in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":160,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"fileId","description":"File ID.","required":true,"type":"string","x-example":"[FILE_ID]","in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](\/docs\/admin).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":166,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":165,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"roles":{"type":"array","description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":["owner"],"x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}]}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":167,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":168,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":169,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":171,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](\/docs\/client\/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https:\/\/github.com\/OWASP\/CheatSheetSeries\/blob\/master\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":170,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.","default":null,"x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["email","roles","url"]}}]}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":172,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](\/docs\/permissions).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":173,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Max length for each role is 32 chars.","default":null,"x-example":null,"items":{"type":"string"}}},"required":["roles"]}}]},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":175,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":174,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":177,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"type":"string","x-example":"[SEARCH]","default":"","in":"query"},{"name":"limit","description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"},{"name":"cursor","description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"string","x-example":"[CURSOR]","default":"","in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"type":"string","x-example":"after","default":"after","in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":176,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.","default":null,"x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":178,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":190,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":186,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":181,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.","required":false,"type":"integer","format":"int32","x-example":0,"default":25,"in":"query"},{"name":"offset","description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"type":"integer","format":"int32","x-example":0,"default":0,"in":"query"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":184,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":185,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":179,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":187,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":180,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":189,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":188,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":182,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateVerification","weight":183,"cookies":false,"type":"","demo":"users\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}}},"tags":[{"name":"account","description":"The Account service allows you to authenticate and manage a user account."},{"name":"avatars","description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."},{"name":"database","description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"},{"name":"locale","description":"The Locale service allows you to customize your app based on your users' location."},{"name":"health","description":"The Health service allows you to both validate and monitor your Appwrite server's health."},{"name":"projects","description":"The Project service allows you to manage all the projects in your Appwrite server."},{"name":"storage","description":"The Storage service allows you to manage your project files."},{"name":"teams","description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"},{"name":"users","description":"The Users service allows you to manage your project users."},{"name":"functions","description":"The Functions Service allows you view, create and manage your Cloud Functions."}],"definitions":{"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","name","registration","status","passwordUpdate","email","emailVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","description":"Session expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"provider":{"type":"string","description":"Session Provider.","x-example":"email"},"providerUid":{"type":"string","description":"Session Provider User ID.","x-example":"user@example.com"},"providerAccessToken":{"type":"string","description":"Session Provider Access Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"providerAccessTokenExpiry":{"type":"integer","description":"Date, the Unix timestamp of when the access token expires.","x-example":1592981250,"format":"int32"},"providerRefreshToken":{"type":"string","description":"Session Provider Refresh Token.","x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"},"ip":{"type":"string","description":"IP in use when the session was created.","x-example":"127.0.0.1"},"osCode":{"type":"string","description":"Operating system code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/os.json).","x-example":"Mac"},"osName":{"type":"string","description":"Operating system name.","x-example":"Mac"},"osVersion":{"type":"string","description":"Operating system version.","x-example":"Mac"},"clientType":{"type":"string","description":"Client type.","x-example":"browser"},"clientCode":{"type":"string","description":"Client code name. View list of [available options](https:\/\/github.com\/appwrite\/appwrite\/blob\/master\/docs\/lists\/clients.json).","x-example":"CM"},"clientName":{"type":"string","description":"Client name.","x-example":"Chrome Mobile iOS"},"clientVersion":{"type":"string","description":"Client version.","x-example":"84.0"},"clientEngine":{"type":"string","description":"Client engine name.","x-example":"WebKit"},"clientEngineVersion":{"type":"string","description":"Client engine name.","x-example":"605.1.15"},"deviceName":{"type":"string","description":"Device name.","x-example":"smartphone"},"deviceBrand":{"type":"string","description":"Device brand name.","x-example":"Google"},"deviceModel":{"type":"string","description":"Device model name.","x-example":"Nexus 5"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"},"current":{"type":"boolean","description":"Returns true if this the current user session.","x-example":true}},"required":["$id","userId","expire","provider","providerUid","providerAccessToken","providerAccessTokenExpiry","providerRefreshToken","ip","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName","current"]},"token":{"description":"Token","type":"object","properties":{"$id":{"type":"string","description":"Token ID.","x-example":"bb8ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c168bb8"},"secret":{"type":"string","description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.","x-example":""},"expire":{"type":"integer","description":"Token expiration date in Unix timestamp.","x-example":1592981250,"format":"int32"}},"required":["$id","userId","secret","expire"]},"locale":{"description":"Locale","type":"object","properties":{"ip":{"type":"string","description":"User IP address.","x-example":"127.0.0.1"},"countryCode":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format","x-example":"US"},"country":{"type":"string","description":"Country name. This field support localization.","x-example":"United States"},"continentCode":{"type":"string","description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.","x-example":"NA"},"continent":{"type":"string","description":"Continent name. This field support localization.","x-example":"North America"},"eu":{"type":"boolean","description":"True if country is part of the Europian Union.","x-example":false},"currency":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format","x-example":"USD"}},"required":["ip","countryCode","country","continentCode","continent","eu","currency"]},"file":{"description":"File","type":"object","properties":{"$id":{"type":"string","description":"File ID.","x-example":"5e5ea5c16897e"},"bucketId":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"File name.","x-example":"Pink.png"},"dateCreated":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"signature":{"type":"string","description":"File MD5 signature.","x-example":"5d529fd02b544198ae075bd57c1762bb"},"mimeType":{"type":"string","description":"File mime type.","x-example":"image\/png"},"sizeOriginal":{"type":"integer","description":"File original size in bytes.","x-example":17890,"format":"int32"},"chunksTotal":{"type":"integer","description":"Total number of chunks available","x-example":17890,"format":"int32"},"chunksUploaded":{"type":"integer","description":"Total number of chunks uploaded","x-example":17890,"format":"int32"}},"required":["$id","bucketId","$read","$write","name","dateCreated","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"File read permissions.","items":{"type":"string"},"x-example":["role:all"]},"$write":{"type":"array","description":"File write permissions.","items":{"type":"string"},"x-example":["user:608f9da25e7e1"]},"permission":{"type":"string","description":"Bucket permission model. Possible values: `bucket` or `file`","x-example":"file"},"dateCreated":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Bucket name.","x-example":"Documents"},"enabled":{"type":"boolean","description":"Bucket enabled.","x-example":false},"maximumFileSize":{"type":"integer","description":"Maximum file size supported.","x-example":100,"format":"int32"},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions.","items":{"type":"string"},"x-example":["jpg","png"]},"encryption":{"type":"boolean","description":"Bucket is encrypted.","x-example":false},"antivirus":{"type":"boolean","description":"Virus scanning is enabled.","x-example":false}},"required":["$id","$read","$write","permission","dateCreated","dateUpdated","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"dateCreated":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","name","dateCreated","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"User name.","x-example":"VIP"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"invited":{"type":"integer","description":"Date, the user has been invited to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"joined":{"type":"integer","description":"Date, the user has accepted the invitation to join the team in Unix timestamp.","x-example":1592981250,"format":"int32"},"confirm":{"type":"boolean","description":"User confirmation status, true if the user has joined the team or false otherwise.","x-example":false},"roles":{"type":"array","description":"User list of roles","items":{"type":"string"},"x-example":"admin"}},"required":["$id","userId","teamId","name","email","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"dateCreated":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"dateUpdated":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981257,"format":"int32"},"status":{"type":"string","description":"Function status. Possible values: `disabled`, `enabled`","x-example":"enabled"},"runtime":{"type":"string","description":"Function execution runtime.","x-example":"python-3.8"},"deployment":{"type":"string","description":"Function's active deployment ID.","x-example":"5e5ea5c16897e"},"vars":{"type":"object","additionalProperties":true,"description":"Function environment variables.","x-example":{"key":"value"}},"events":{"type":"array","description":"Function trigger events.","items":{"type":"string"},"x-example":"account.create"},"schedule":{"type":"string","description":"Function execution schedult in CRON format.","x-example":"5 4 * * *"},"scheduleNext":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981292,"format":"int32"},"schedulePrevious":{"type":"integer","description":"Function next scheduled execution date in Unix timestamp.","x-example":1592981237,"format":"int32"},"timeout":{"type":"integer","description":"Function execution timeout in seconds.","x-example":1592981237,"format":"int32"}},"required":["$id","execute","name","dateCreated","dateUpdated","status","runtime","deployment","vars","events","schedule","scheduleNext","schedulePrevious","timeout"]},"runtime":{"description":"Runtime","type":"object","properties":{"$id":{"type":"string","description":"Runtime ID.","x-example":"python-3.8"},"name":{"type":"string","description":"Runtime Name.","x-example":"Python"},"version":{"type":"string","description":"Runtime version.","x-example":"3.8"},"base":{"type":"string","description":"Base Docker image used to build the runtime.","x-example":"python:3.8-alpine"},"image":{"type":"string","description":"Image name of Docker Hub.","x-example":"appwrite\\\/runtime-for-python:3.8"},"logo":{"type":"string","description":"Name of the logo image.","x-example":"python.png"},"supports":{"type":"array","description":"List of supported architectures.","items":{"type":"string"},"x-example":"amd64"}},"required":["$id","name","version","base","image","logo","supports"]},"deployment":{"description":"Deployment","type":"object","properties":{"$id":{"type":"string","description":"Deployment ID.","x-example":"5e5ea5c16897e"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"dateCreated":{"type":"integer","description":"The deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"entrypoint":{"type":"string","description":"The entrypoint file to use to execute the deployment code.","x-example":"enabled"},"size":{"type":"integer","description":"The code size in bytes.","x-example":128,"format":"int32"},"buildId":{"type":"string","description":"The current build ID.","x-example":"5e5ea5c16897e"},"activate":{"type":"boolean","description":"Whether the deployment should be automatically activated.","x-example":true},"status":{"type":"string","description":"The deployment status.","x-example":"enabled"},"buildStdout":{"type":"string","description":"The build stdout.","x-example":"enabled"},"buildStderr":{"type":"string","description":"The build stderr.","x-example":"enabled"}},"required":["$id","resourceId","resourceType","dateCreated","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"dateCreated":{"type":"integer","description":"The execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"trigger":{"type":"string","description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.","x-example":"http"},"status":{"type":"string","description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.","x-example":"processing"},"statusCode":{"type":"integer","description":"The script status code.","x-example":0,"format":"int32"},"stdout":{"type":"string","description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.","x-example":""},"stderr":{"type":"string","description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output","x-example":""},"time":{"type":"number","description":"The script execution time in seconds.","x-example":0.4,"format":"double"}},"required":["$id","$read","functionId","dateCreated","trigger","status","statusCode","stdout","stderr","time"]},"country":{"description":"Country","type":"object","properties":{"name":{"type":"string","description":"Country name.","x-example":"United States"},"code":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"}},"required":["name","code"]},"continent":{"description":"Continent","type":"object","properties":{"name":{"type":"string","description":"Continent name.","x-example":"Europe"},"code":{"type":"string","description":"Continent two letter code.","x-example":"EU"}},"required":["name","code"]},"language":{"description":"Language","type":"object","properties":{"name":{"type":"string","description":"Language name.","x-example":"Italian"},"code":{"type":"string","description":"Language two-character ISO 639-1 codes.","x-example":"it"},"nativeName":{"type":"string","description":"Language native name.","x-example":"Italiano"}},"required":["name","code","nativeName"]},"currency":{"description":"Currency","type":"object","properties":{"symbol":{"type":"string","description":"Currency symbol.","x-example":"$"},"name":{"type":"string","description":"Currency name.","x-example":"US dollar"},"symbolNative":{"type":"string","description":"Currency native symbol.","x-example":"$"},"decimalDigits":{"type":"integer","description":"Number of decimal digits.","x-example":2,"format":"int32"},"rounding":{"type":"number","description":"Currency digit rounding.","x-example":0,"format":"double"},"code":{"type":"string","description":"Currency code in [ISO 4217-1](http:\/\/en.wikipedia.org\/wiki\/ISO_4217) three-character format.","x-example":"USD"},"namePlural":{"type":"string","description":"Currency plural name","x-example":"US dollars"}},"required":["symbol","name","symbolNative","decimalDigits","rounding","code","namePlural"]},"phone":{"description":"Phone","type":"object","properties":{"code":{"type":"string","description":"Phone code.","x-example":"+1"},"countryCode":{"type":"string","description":"Country two-character ISO 3166-1 alpha code.","x-example":"US"},"countryName":{"type":"string","description":"Country name.","x-example":"United States"}},"required":["code","countryCode","countryName"]},"healthAntivirus":{"description":"Health Antivirus","type":"object","properties":{"version":{"type":"string","description":"Antivirus version.","x-example":"1.0.0"},"status":{"type":"string","description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`","x-example":"online"}},"required":["version","status"]},"healthQueue":{"description":"Health Queue","type":"object","properties":{"size":{"type":"integer","description":"Amount of actions in the queue.","x-example":8,"format":"int32"}},"required":["size"]},"healthStatus":{"description":"Health Status","type":"object","properties":{"ping":{"type":"integer","description":"Duration in milliseconds how long the health check took.","x-example":128,"format":"int32"},"status":{"type":"string","description":"Service status. Possible values can are: `pass`, `fail`","x-example":"pass"}},"required":["ping","status"]},"healthTime":{"description":"Health Time","type":"object","properties":{"remoteTime":{"type":"integer","description":"Current unix timestamp on trustful remote server.","x-example":1639490751,"format":"int32"},"localTime":{"type":"integer","description":"Current unix timestamp of local server where Appwrite runs.","x-example":1639490844,"format":"int32"},"diff":{"type":"integer","description":"Difference of unix remote and local timestamps in milliseconds.","x-example":93,"format":"int32"}},"required":["remoteTime","localTime","diff"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{ + "swagger": "2.0", + "info": { + "version": "0.13.4", + "title": "Appwrite", + "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", + "termsOfService": "https://appwrite.io/policy/terms", + "contact": { + "name": "Appwrite Team", + "url": "https://appwrite.io/support", + "email": "team@appwrite.io" + }, + "license": { + "name": "BSD-3-Clause", + "url": "https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE" + } + }, + "host": "HOSTNAME", + "basePath": "/v1", + "schemes": ["https"], + "consumes": ["application/json", "multipart/form-data"], + "produces": ["application/json"], + "securityDefinitions": { + "Project": { + "type": "apiKey", + "name": "X-Appwrite-Project", + "description": "Your project ID", + "in": "header", + "x-appwrite": { "demo": "5df5acd0d48c2" } + }, + "Key": { + "type": "apiKey", + "name": "X-Appwrite-Key", + "description": "Your secret API key", + "in": "header", + "x-appwrite": { "demo": "919c2d18fb5d4...a2ae413da83346ad2" } + }, + "JWT": { + "type": "apiKey", + "name": "X-Appwrite-JWT", + "description": "Your secret JSON Web Token", + "in": "header", + "x-appwrite": { "demo": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..." } + }, + "Locale": { + "type": "apiKey", + "name": "X-Appwrite-Locale", + "description": "", + "in": "header", + "x-appwrite": { "demo": "en" } + } + }, + "paths": { + "/account": { + "get": { + "summary": "Get Account", + "operationId": "accountGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user data as JSON object.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 47, + "cookies": false, + "type": "", + "demo": "account/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "delete": { + "summary": "Delete Account", + "operationId": "accountDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 56, + "cookies": false, + "type": "", + "demo": "account/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/account/email": { + "patch": { + "summary": "Update Account Email", + "operationId": "accountUpdateEmail", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 54, + "cookies": false, + "type": "", + "demo": "account/update-email.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["email", "password"] + } + } + ] + } + }, + "/account/logs": { + "get": { + "summary": "Get Account Logs", + "operationId": "accountGetLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.", + "responses": { + "200": { + "description": "Logs List", + "schema": { "$ref": "#/definitions/logList" } + } + }, + "x-appwrite": { + "method": "getLogs", + "weight": 50, + "cookies": false, + "type": "", + "demo": "account/get-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "limit", + "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "/account/name": { + "patch": { + "summary": "Update Account Name", + "operationId": "accountUpdateName", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account name.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 52, + "cookies": false, + "type": "", + "demo": "account/update-name.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + } + }, + "/account/password": { + "patch": { + "summary": "Update Account Password", + "operationId": "accountUpdatePassword", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePassword", + "weight": 53, + "cookies": false, + "type": "", + "demo": "account/update-password.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "oldPassword": { + "type": "string", + "description": "Current user password. Must be at least 8 chars.", + "default": "", + "x-example": "password" + } + }, + "required": ["password"] + } + } + ] + } + }, + "/account/prefs": { + "get": { + "summary": "Get Account Preferences", + "operationId": "accountGetPrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user preferences as a key-value object.", + "responses": { + "200": { + "description": "Preferences", + "schema": { "$ref": "#/definitions/preferences" } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 48, + "cookies": false, + "type": "", + "demo": "account/get-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "patch": { + "summary": "Update Account Preferences", + "operationId": "accountUpdatePrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 55, + "cookies": false, + "type": "", + "demo": "account/update-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": ["prefs"] + } + } + ] + } + }, + "/account/recovery": { + "post": { + "summary": "Create Password Recovery", + "operationId": "accountCreateRecovery", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createRecovery", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account/create-recovery.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": ["url:{url},email:{param-email}", "ip:{ip}"], + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + } + }, + "required": ["email", "url"] + } + } + ] + }, + "put": { + "summary": "Create Password Recovery (confirmation)", + "operationId": "accountUpdateRecovery", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.", + "responses": { + "200": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "updateRecovery", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account/update-recovery.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-recovery.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid reset token.", + "default": null, + "x-example": "[SECRET]" + }, + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "passwordAgain": { + "type": "string", + "description": "Repeat new user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["userId", "secret", "password", "passwordAgain"] + } + } + ] + } + }, + "/account/sessions": { + "get": { + "summary": "Get Account Sessions", + "operationId": "accountGetSessions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Get currently logged in user list of active sessions across different devices.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { "$ref": "#/definitions/sessionList" } + } + }, + "x-appwrite": { + "method": "getSessions", + "weight": 49, + "cookies": false, + "type": "", + "demo": "account/get-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + }, + "delete": { + "summary": "Delete All Account Sessions", + "operationId": "accountDeleteSessions", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSessions", + "weight": 59, + "cookies": false, + "type": "", + "demo": "account/delete-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-sessions.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }] + } + }, + "/account/sessions/{sessionId}": { + "get": { + "summary": "Get Session By ID", + "operationId": "accountGetSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "getSession", + "weight": 51, + "cookies": false, + "type": "", + "demo": "account/get-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/get-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to get the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Session (Refresh Tokens)", + "operationId": "accountUpdateSession", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "", + "responses": { + "200": { + "description": "Session", + "schema": { "$ref": "#/definitions/session" } + } + }, + "x-appwrite": { + "method": "updateSession", + "weight": 58, + "cookies": false, + "type": "", + "demo": "account/update-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-session.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to update the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Account Session", + "operationId": "accountDeleteSession", + "consumes": ["application/json"], + "produces": [], + "tags": ["account"], + "description": "Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSession", + "weight": 57, + "cookies": false, + "type": "", + "demo": "account/delete-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/delete-session.md", + "rate-limit": 100, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "sessionId", + "description": "Session ID. Use the string 'current' to delete the current device session.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + } + }, + "/account/verification": { + "post": { + "summary": "Create Email Verification", + "operationId": "accountCreateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n", + "responses": { + "201": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "createVerification", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account/create-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/create-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{userId}", + "scope": "account", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + } + }, + "required": ["url"] + } + } + ] + }, + "put": { + "summary": "Create Email Verification (confirmation)", + "operationId": "accountUpdateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["account"], + "description": "Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.", + "responses": { + "200": { + "description": "Token", + "schema": { "$ref": "#/definitions/token" } + } + }, + "x-appwrite": { + "method": "updateVerification", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account/update-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/account/update-verification.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},userId:{param-userId}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Valid verification token.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + }, + "/avatars/browsers/{code}": { + "get": { + "summary": "Get Browser Icon", + "operationId": "avatarsGetBrowser", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getBrowser", + "weight": 65, + "cookies": false, + "type": "location", + "demo": "avatars/get-browser.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "type": "string", + "x-example": "aa", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/credit-cards/{code}": { + "get": { + "summary": "Get Credit Card Icon", + "operationId": "avatarsGetCreditCard", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getCreditCard", + "weight": 64, + "cookies": false, + "type": "location", + "demo": "avatars/get-credit-card.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-credit-card.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.", + "required": true, + "type": "string", + "x-example": "amex", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/favicon": { + "get": { + "summary": "Get Favicon", + "operationId": "avatarsGetFavicon", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["avatars"], + "description": "Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFavicon", + "weight": 68, + "cookies": false, + "type": "location", + "demo": "avatars/get-favicon.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-favicon.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "url", + "description": "Website URL which you want to fetch the favicon from.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "in": "query" + } + ] + } + }, + "/avatars/flags/{code}": { + "get": { + "summary": "Get Country Flag", + "operationId": "avatarsGetFlag", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFlag", + "weight": 66, + "cookies": false, + "type": "location", + "demo": "avatars/get-flag.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-flag.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "code", + "description": "Country Code. ISO Alpha-2 country code format.", + "required": true, + "type": "string", + "x-example": "af", + "in": "path" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "quality", + "description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + } + ] + } + }, + "/avatars/image": { + "get": { + "summary": "Get Image from URL", + "operationId": "avatarsGetImage", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["avatars"], + "description": "Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getImage", + "weight": 67, + "cookies": false, + "type": "location", + "demo": "avatars/get-image.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-image.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "url", + "description": "Image URL which you want to crop.", + "required": true, + "type": "string", + "format": "url", + "x-example": "https://example.com", + "in": "query" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 2000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 2000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + } + ] + } + }, + "/avatars/initials": { + "get": { + "summary": "Get User Initials", + "operationId": "avatarsGetInitials", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getInitials", + "weight": 70, + "cookies": false, + "type": "location", + "demo": "avatars/get-initials.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-initials.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "name", + "description": "Full Name. When empty, current user name or email will be used. Max length: 128 chars.", + "required": false, + "type": "string", + "x-example": "[NAME]", + "default": "", + "in": "query" + }, + { + "name": "width", + "description": "Image width. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "height", + "description": "Image height. Pass an integer between 0 to 2000. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 500, + "in": "query" + }, + { + "name": "color", + "description": "Changes text color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "background", + "description": "Changes background color. By default a random color will be picked and stay will persistent to the given name.", + "required": false, + "type": "string", + "default": "", + "in": "query" + } + ] + } + }, + "/avatars/qr": { + "get": { + "summary": "Get QR Code", + "operationId": "avatarsGetQR", + "consumes": ["application/json"], + "produces": ["image/png"], + "tags": ["avatars"], + "description": "Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getQR", + "weight": 69, + "cookies": false, + "type": "location", + "demo": "avatars/get-q-r.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/avatars/get-qr.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "text", + "description": "Plain text to be converted to QR code image.", + "required": true, + "type": "string", + "x-example": "[TEXT]", + "in": "query" + }, + { + "name": "size", + "description": "QR code size. Pass an integer between 0 to 1000. Defaults to 400.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 400, + "in": "query" + }, + { + "name": "margin", + "description": "Margin from edge. Pass an integer between 0 to 10. Defaults to 1.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "download", + "description": "Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.", + "required": false, + "type": "boolean", + "x-example": false, + "default": false, + "in": "query" + } + ] + } + }, + "/database/collections": { + "get": { + "summary": "List Collections", + "operationId": "databaseListCollections", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Collections List", + "schema": { "$ref": "#/definitions/collectionList" } + } + }, + "x-appwrite": { + "method": "listCollections", + "weight": 72, + "cookies": false, + "type": "", + "demo": "database/list-collections.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-collections.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Collection", + "operationId": "databaseCreateCollection", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a new Collection.", + "responses": { + "201": { + "description": "Collection", + "schema": { "$ref": "#/definitions/collection" } + } + }, + "x-appwrite": { + "method": "createCollection", + "weight": 71, + "cookies": false, + "type": "", + "demo": "database/create-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "collectionId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[COLLECTION_ID]" + }, + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "document" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": [ + "collectionId", + "name", + "permission", + "read", + "write" + ] + } + } + ] + } + }, + "/database/collections/{collectionId}": { + "get": { + "summary": "Get Collection", + "operationId": "databaseGetCollection", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.", + "responses": { + "200": { + "description": "Collection", + "schema": { "$ref": "#/definitions/collection" } + } + }, + "x-appwrite": { + "method": "getCollection", + "weight": 73, + "cookies": false, + "type": "", + "demo": "database/get-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Collection", + "operationId": "databaseUpdateCollection", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Update a collection by its unique ID.", + "responses": { + "200": { + "description": "Collection", + "schema": { "$ref": "#/definitions/collection" } + } + }, + "x-appwrite": { + "method": "updateCollection", + "weight": 77, + "cookies": false, + "type": "", + "demo": "database/update-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Collection name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "document" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "enabled": { + "type": "boolean", + "description": "Is collection enabled?", + "default": true, + "x-example": false + } + }, + "required": ["name", "permission"] + } + } + ] + }, + "delete": { + "summary": "Delete Collection", + "operationId": "databaseDeleteCollection", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteCollection", + "weight": 78, + "cookies": false, + "type": "", + "demo": "database/delete-collection.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-collection.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/attributes": { + "get": { + "summary": "List Attributes", + "operationId": "databaseListAttributes", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "Attributes List", + "schema": { "$ref": "#/definitions/attributeList" } + } + }, + "x-appwrite": { + "method": "listAttributes", + "weight": 87, + "cookies": false, + "type": "", + "demo": "database/list-attributes.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-attributes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/attributes/boolean": { + "post": { + "summary": "Create Boolean Attribute", + "operationId": "databaseCreateBooleanAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a boolean attribute.\n", + "responses": { + "201": { + "description": "AttributeBoolean", + "schema": { "$ref": "#/definitions/attributeBoolean" } + } + }, + "x-appwrite": { + "method": "createBooleanAttribute", + "weight": 86, + "cookies": false, + "type": "", + "demo": "database/create-boolean-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-boolean-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": false + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/email": { + "post": { + "summary": "Create Email Attribute", + "operationId": "databaseCreateEmailAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create an email attribute.\n", + "responses": { + "201": { + "description": "AttributeEmail", + "schema": { "$ref": "#/definitions/attributeEmail" } + } + }, + "x-appwrite": { + "method": "createEmailAttribute", + "weight": 80, + "cookies": false, + "type": "", + "demo": "database/create-email-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-email-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "email@example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/enum": { + "post": { + "summary": "Create Enum Attribute", + "operationId": "databaseCreateEnumAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "201": { + "description": "AttributeEnum", + "schema": { "$ref": "#/definitions/attributeEnum" } + } + }, + "x-appwrite": { + "method": "createEnumAttribute", + "weight": 81, + "cookies": false, + "type": "", + "demo": "database/create-enum-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-attribute-enum.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type. Uses length of longest element to determine size.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "[DEFAULT]" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "elements", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/float": { + "post": { + "summary": "Create Float Attribute", + "operationId": "databaseCreateFloatAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a float attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "201": { + "description": "AttributeFloat", + "schema": { "$ref": "#/definitions/attributeFloat" } + } + }, + "x-appwrite": { + "method": "createFloatAttribute", + "weight": 85, + "cookies": false, + "type": "", + "demo": "database/create-float-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-float-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "number", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "number", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/integer": { + "post": { + "summary": "Create Integer Attribute", + "operationId": "databaseCreateIntegerAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create an integer attribute. Optionally, minimum and maximum values can be provided.\n", + "responses": { + "201": { + "description": "AttributeInteger", + "schema": { "$ref": "#/definitions/attributeInteger" } + } + }, + "x-appwrite": { + "method": "createIntegerAttribute", + "weight": 84, + "cookies": false, + "type": "", + "demo": "database/create-integer-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-integer-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce on new documents", + "default": null, + "x-example": null + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce on new documents", + "default": null, + "x-example": null + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/ip": { + "post": { + "summary": "Create IP Address Attribute", + "operationId": "databaseCreateIpAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create IP address attribute.\n", + "responses": { + "201": { + "description": "AttributeIP", + "schema": { "$ref": "#/definitions/attributeIp" } + } + }, + "x-appwrite": { + "method": "createIpAttribute", + "weight": 82, + "cookies": false, + "type": "", + "demo": "database/create-ip-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-ip-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": null + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/string": { + "post": { + "summary": "Create String Attribute", + "operationId": "databaseCreateStringAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a string attribute.\n", + "responses": { + "201": { + "description": "AttributeString", + "schema": { "$ref": "#/definitions/attributeString" } + } + }, + "x-appwrite": { + "method": "createStringAttribute", + "weight": 79, + "cookies": false, + "type": "", + "demo": "database/create-string-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-string-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "size": { + "type": "integer", + "description": "Attribute size for text attributes, in number of characters.", + "default": null, + "x-example": 1 + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "[DEFAULT]" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "size", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/url": { + "post": { + "summary": "Create URL Attribute", + "operationId": "databaseCreateUrlAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a URL attribute.\n", + "responses": { + "201": { + "description": "AttributeURL", + "schema": { "$ref": "#/definitions/attributeUrl" } + } + }, + "x-appwrite": { + "method": "createUrlAttribute", + "weight": 83, + "cookies": false, + "type": "", + "demo": "database/create-url-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-url-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "default": null, + "x-example": null + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "default": null, + "x-example": false + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "default": null, + "x-example": "https://example.com" + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "default": false, + "x-example": false + } + }, + "required": ["key", "required"] + } + } + ] + } + }, + "/database/collections/{collectionId}/attributes/{key}": { + "get": { + "summary": "Get Attribute", + "operationId": "databaseGetAttribute", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString", + "schema": { + "x-oneOf": [ + { "$ref": "#/definitions/attributeBoolean" }, + { "$ref": "#/definitions/attributeInteger" }, + { "$ref": "#/definitions/attributeFloat" }, + { "$ref": "#/definitions/attributeEmail" }, + { "$ref": "#/definitions/attributeEnum" }, + { "$ref": "#/definitions/attributeUrl" }, + { "$ref": "#/definitions/attributeIp" }, + { "$ref": "#/definitions/attributeString" } + ] + } + } + }, + "x-appwrite": { + "method": "getAttribute", + "weight": 88, + "cookies": false, + "type": "", + "demo": "database/get-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Attribute", + "operationId": "databaseDeleteAttribute", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteAttribute", + "weight": 89, + "cookies": false, + "type": "", + "demo": "database/delete-attribute.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-attribute.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Attribute Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/documents": { + "get": { + "summary": "List Documents", + "operationId": "databaseListDocuments", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Documents List", + "schema": { "$ref": "#/definitions/documentList" } + } + }, + "x-appwrite": { + "method": "listDocuments", + "weight": 95, + "cookies": false, + "type": "", + "demo": "database/list-documents.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-documents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents).", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderAttributes", + "description": "Array of attributes used to sort results.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + }, + { + "name": "orderTypes", + "description": "Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create Document", + "operationId": "databaseCreateDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.", + "responses": { + "201": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "createDocument", + "weight": 94, + "cookies": false, + "type": "", + "demo": "database/create-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "documentId": { + "type": "string", + "description": "Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[DOCUMENT_ID]" + }, + "data": { + "type": "object", + "description": "Document data as JSON object.", + "default": {}, + "x-example": "{}" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": ["documentId", "data"] + } + } + ] + } + }, + "/database/collections/{collectionId}/documents/{documentId}": { + "get": { + "summary": "Get Document", + "operationId": "databaseGetDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Get a document by its unique ID. This endpoint response returns a JSON object with the document data.", + "responses": { + "200": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "getDocument", + "weight": 96, + "cookies": false, + "type": "", + "demo": "database/get-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Document", + "operationId": "databaseUpdateDocument", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Document", + "schema": { "$ref": "#/definitions/document" } + } + }, + "x-appwrite": { + "method": "updateDocument", + "weight": 98, + "cookies": false, + "type": "", + "demo": "database/update-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/update-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": {}, + "x-example": "{}" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + }, + "required": ["data"] + } + } + ] + }, + "delete": { + "summary": "Delete Document", + "operationId": "databaseDeleteDocument", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "Delete a document by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteDocument", + "weight": 99, + "cookies": false, + "type": "", + "demo": "database/delete-document.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-document.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "documentId", + "description": "Document ID.", + "required": true, + "type": "string", + "x-example": "[DOCUMENT_ID]", + "in": "path" + } + ] + } + }, + "/database/collections/{collectionId}/indexes": { + "get": { + "summary": "List Indexes", + "operationId": "databaseListIndexes", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "Indexes List", + "schema": { "$ref": "#/definitions/indexList" } + } + }, + "x-appwrite": { + "method": "listIndexes", + "weight": 91, + "cookies": false, + "type": "", + "demo": "database/list-indexes.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/list-indexes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + } + ] + }, + "post": { + "summary": "Create Index", + "operationId": "databaseCreateIndex", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "201": { + "description": "Index", + "schema": { "$ref": "#/definitions/index" } + } + }, + "x-appwrite": { + "method": "createIndex", + "weight": 90, + "cookies": false, + "type": "", + "demo": "database/create-index.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/create-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "default": null, + "x-example": null + }, + "type": { + "type": "string", + "description": "Index type.", + "default": null, + "x-example": "key" + }, + "attributes": { + "type": "array", + "description": "Array of attributes to index.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "orders": { + "type": "array", + "description": "Array of index orders.", + "default": [], + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["key", "type", "attributes"] + } + } + ] + } + }, + "/database/collections/{collectionId}/indexes/{key}": { + "get": { + "summary": "Get Index", + "operationId": "databaseGetIndex", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["database"], + "description": "", + "responses": { + "200": { + "description": "Index", + "schema": { "$ref": "#/definitions/index" } + } + }, + "x-appwrite": { + "method": "getIndex", + "weight": 92, + "cookies": false, + "type": "", + "demo": "database/get-index.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/get-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Index", + "operationId": "databaseDeleteIndex", + "consumes": ["application/json"], + "produces": [], + "tags": ["database"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteIndex", + "weight": 93, + "cookies": false, + "type": "", + "demo": "database/delete-index.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/database/delete-index.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "collections.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).", + "required": true, + "type": "string", + "x-example": "[COLLECTION_ID]", + "in": "path" + }, + { + "name": "key", + "description": "Index Key.", + "required": true, + "type": "string", + "in": "path" + } + ] + } + }, + "/functions": { + "get": { + "summary": "List Functions", + "operationId": "functionsList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all the project's functions. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Functions List", + "schema": { "$ref": "#/definitions/functionList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 193, + "cookies": false, + "type": "", + "demo": "functions/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Function", + "operationId": "functionsCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Create a new function. You can pass a list of [permissions](/docs/permissions) to allow different project users or team with access to execute the function using the client API.", + "responses": { + "201": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 192, + "cookies": false, + "type": "", + "demo": "functions/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "functionId": { + "type": "string", + "description": "Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[FUNCTION_ID]" + }, + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "execute": { + "type": "array", + "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "runtime": { + "type": "string", + "description": "Execution runtime.", + "default": null, + "x-example": "node-14.5" + }, + "vars": { + "type": "object", + "description": "Key-value JSON object that will be passed to the function as environment variables.", + "default": [], + "x-example": "{}" + }, + "events": { + "type": "array", + "description": "Events list.", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Function maximum execution time in seconds.", + "default": 15, + "x-example": 1 + } + }, + "required": ["functionId", "name", "execute", "runtime"] + } + } + ] + } + }, + "/functions/runtimes": { + "get": { + "summary": "List runtimes", + "operationId": "functionsListRuntimes", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all runtimes that are currently active on your instance.", + "responses": { + "200": { + "description": "Runtimes List", + "schema": { "$ref": "#/definitions/runtimeList" } + } + }, + "x-appwrite": { + "method": "listRuntimes", + "weight": 194, + "cookies": false, + "type": "", + "demo": "functions/list-runtimes.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-runtimes.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/functions/{functionId}": { + "get": { + "summary": "Get Function", + "operationId": "functionsGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 195, + "cookies": false, + "type": "", + "demo": "functions/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Function", + "operationId": "functionsUpdate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Update function by its unique ID.", + "responses": { + "200": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "update", + "weight": 197, + "cookies": false, + "type": "", + "demo": "functions/update.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Function name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "execute": { + "type": "array", + "description": "An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "vars": { + "type": "object", + "description": "Key-value JSON object that will be passed to the function as environment variables.", + "default": [], + "x-example": "{}" + }, + "events": { + "type": "array", + "description": "Events list.", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "schedule": { + "type": "string", + "description": "Schedule CRON syntax.", + "default": "", + "x-example": null + }, + "timeout": { + "type": "integer", + "description": "Maximum execution time in seconds.", + "default": 15, + "x-example": 1 + } + }, + "required": ["name", "execute"] + } + } + ] + }, + "delete": { + "summary": "Delete Function", + "operationId": "functionsDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["functions"], + "description": "Delete a function by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 199, + "cookies": false, + "type": "", + "demo": "functions/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-function.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/deployments": { + "get": { + "summary": "List Deployments", + "operationId": "functionsListDeployments", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all the project's code deployments. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { "$ref": "#/definitions/deploymentList" } + } + }, + "x-appwrite": { + "method": "listDeployments", + "weight": 201, + "cookies": false, + "type": "", + "demo": "functions/list-deployments.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-deployments.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Deployment", + "operationId": "functionsCreateDeployment", + "consumes": ["multipart/form-data"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](/docs/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.", + "responses": { + "201": { + "description": "Deployment", + "schema": { "$ref": "#/definitions/deployment" } + } + }, + "x-appwrite": { + "method": "createDeployment", + "weight": 200, + "cookies": false, + "type": "", + "demo": "functions/create-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": true, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "entrypoint", + "description": "Entrypoint File.", + "required": true, + "type": "string", + "x-example": "[ENTRYPOINT]", + "in": "formData" + }, + { + "name": "code", + "description": "Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "activate", + "description": "Automatically activate the deployment when it is finished building.", + "required": true, + "type": "boolean", + "x-example": false, + "in": "formData" + } + ] + } + }, + "/functions/{functionId}/deployments/{deploymentId}": { + "get": { + "summary": "Get Deployment", + "operationId": "functionsGetDeployment", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a code deployment by its unique ID.", + "responses": { + "200": { + "description": "Deployments List", + "schema": { "$ref": "#/definitions/deploymentList" } + } + }, + "x-appwrite": { + "method": "getDeployment", + "weight": 202, + "cookies": false, + "type": "", + "demo": "functions/get-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Function Deployment", + "operationId": "functionsUpdateDeployment", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.", + "responses": { + "200": { + "description": "Function", + "schema": { "$ref": "#/definitions/function" } + } + }, + "x-appwrite": { + "method": "updateDeployment", + "weight": 198, + "cookies": false, + "type": "", + "demo": "functions/update-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/update-function-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Deployment", + "operationId": "functionsDeleteDeployment", + "consumes": ["application/json"], + "produces": [], + "tags": ["functions"], + "description": "Delete a code deployment by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteDeployment", + "weight": 203, + "cookies": false, + "type": "", + "demo": "functions/delete-deployment.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/delete-deployment.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/deployments/{deploymentId}/builds/{buildId}": { + "post": { + "summary": "Retry Build", + "operationId": "functionsRetryBuild", + "consumes": ["application/json"], + "produces": [], + "tags": ["functions"], + "description": "", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "retryBuild", + "weight": 207, + "cookies": false, + "type": "", + "demo": "functions/retry-build.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/retry-build.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "functions.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "deploymentId", + "description": "Deployment ID.", + "required": true, + "type": "string", + "x-example": "[DEPLOYMENT_ID]", + "in": "path" + }, + { + "name": "buildId", + "description": "Build unique ID.", + "required": true, + "type": "string", + "x-example": "[BUILD_ID]", + "in": "path" + } + ] + } + }, + "/functions/{functionId}/executions": { + "get": { + "summary": "List Executions", + "operationId": "functionsListExecutions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Executions List", + "schema": { "$ref": "#/definitions/executionList" } + } + }, + "x-appwrite": { + "method": "listExecutions", + "weight": 205, + "cookies": false, + "type": "", + "demo": "functions/list-executions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/list-executions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Execution", + "operationId": "functionsCreateExecution", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.", + "responses": { + "201": { + "description": "Execution", + "schema": { "$ref": "#/definitions/execution" } + } + }, + "x-appwrite": { + "method": "createExecution", + "weight": 204, + "cookies": false, + "type": "", + "demo": "functions/create-execution.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/create-execution.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "String of custom data to send to function.", + "default": "", + "x-example": "[DATA]" + }, + "async": { + "type": "boolean", + "description": "Execute code asynchronously. Default value is true.", + "default": true, + "x-example": false + } + } + } + } + ] + } + }, + "/functions/{functionId}/executions/{executionId}": { + "get": { + "summary": "Get Execution", + "operationId": "functionsGetExecution", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["functions"], + "description": "Get a function execution log by its unique ID.", + "responses": { + "200": { + "description": "Execution", + "schema": { "$ref": "#/definitions/execution" } + } + }, + "x-appwrite": { + "method": "getExecution", + "weight": 206, + "cookies": false, + "type": "", + "demo": "functions/get-execution.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/functions/get-execution.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "execution.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "functionId", + "description": "Function ID.", + "required": true, + "type": "string", + "x-example": "[FUNCTION_ID]", + "in": "path" + }, + { + "name": "executionId", + "description": "Execution ID.", + "required": true, + "type": "string", + "x-example": "[EXECUTION_ID]", + "in": "path" + } + ] + } + }, + "/health": { + "get": { + "summary": "Get HTTP", + "operationId": "healthGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite HTTP server is up and responsive.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 107, + "cookies": false, + "type": "", + "demo": "health/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/anti-virus": { + "get": { + "summary": "Get Antivirus", + "operationId": "healthGetAntivirus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite Antivirus server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Antivirus", + "schema": { "$ref": "#/definitions/healthAntivirus" } + } + }, + "x-appwrite": { + "method": "getAntivirus", + "weight": 118, + "cookies": false, + "type": "", + "demo": "health/get-antivirus.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-anti-virus.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/cache": { + "get": { + "summary": "Get Cache", + "operationId": "healthGetCache", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite in-memory cache server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "getCache", + "weight": 110, + "cookies": false, + "type": "", + "demo": "health/get-cache.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-cache.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/db": { + "get": { + "summary": "Get DB", + "operationId": "healthGetDB", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite database server is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "getDB", + "weight": 109, + "cookies": false, + "type": "", + "demo": "health/get-d-b.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-db.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/certificates": { + "get": { + "summary": "Get Certificates Queue", + "operationId": "healthGetQueueCertificates", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueCertificates", + "weight": 115, + "cookies": false, + "type": "", + "demo": "health/get-queue-certificates.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-certificates.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/functions": { + "get": { + "summary": "Get Functions Queue", + "operationId": "healthGetQueueFunctions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueFunctions", + "weight": 116, + "cookies": false, + "type": "", + "demo": "health/get-queue-functions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-functions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/logs": { + "get": { + "summary": "Get Logs Queue", + "operationId": "healthGetQueueLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of logs that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueLogs", + "weight": 113, + "cookies": false, + "type": "", + "demo": "health/get-queue-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/usage": { + "get": { + "summary": "Get Usage Queue", + "operationId": "healthGetQueueUsage", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueUsage", + "weight": 114, + "cookies": false, + "type": "", + "demo": "health/get-queue-usage.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-usage.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/queue/webhooks": { + "get": { + "summary": "Get Webhooks Queue", + "operationId": "healthGetQueueWebhooks", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.", + "responses": { + "200": { + "description": "Health Queue", + "schema": { "$ref": "#/definitions/healthQueue" } + } + }, + "x-appwrite": { + "method": "getQueueWebhooks", + "weight": 112, + "cookies": false, + "type": "", + "demo": "health/get-queue-webhooks.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-queue-webhooks.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/storage/local": { + "get": { + "summary": "Get Local Storage", + "operationId": "healthGetStorageLocal", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite local storage device is up and connection is successful.", + "responses": { + "200": { + "description": "Health Status", + "schema": { "$ref": "#/definitions/healthStatus" } + } + }, + "x-appwrite": { + "method": "getStorageLocal", + "weight": 117, + "cookies": false, + "type": "", + "demo": "health/get-storage-local.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-storage-local.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/health/time": { + "get": { + "summary": "Get Time", + "operationId": "healthGetTime", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["health"], + "description": "Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.", + "responses": { + "200": { + "description": "Health Time", + "schema": { "$ref": "#/definitions/healthTime" } + } + }, + "x-appwrite": { + "method": "getTime", + "weight": 111, + "cookies": false, + "type": "", + "demo": "health/get-time.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/health/get-time.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "health.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }] + } + }, + "/locale": { + "get": { + "summary": "Get User Locale", + "operationId": "localeGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))", + "responses": { + "200": { + "description": "Locale", + "schema": { "$ref": "#/definitions/locale" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 100, + "cookies": false, + "type": "", + "demo": "locale/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-locale.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/continents": { + "get": { + "summary": "List Continents", + "operationId": "localeGetContinents", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all continents. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Continents List", + "schema": { "$ref": "#/definitions/continentList" } + } + }, + "x-appwrite": { + "method": "getContinents", + "weight": 104, + "cookies": false, + "type": "", + "demo": "locale/get-continents.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-continents.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/countries": { + "get": { + "summary": "List Countries", + "operationId": "localeGetCountries", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { "$ref": "#/definitions/countryList" } + } + }, + "x-appwrite": { + "method": "getCountries", + "weight": 101, + "cookies": false, + "type": "", + "demo": "locale/get-countries.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/countries/eu": { + "get": { + "summary": "List EU Countries", + "operationId": "localeGetCountriesEU", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Countries List", + "schema": { "$ref": "#/definitions/countryList" } + } + }, + "x-appwrite": { + "method": "getCountriesEU", + "weight": 102, + "cookies": false, + "type": "", + "demo": "locale/get-countries-e-u.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-eu.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/countries/phones": { + "get": { + "summary": "List Countries Phone Codes", + "operationId": "localeGetCountriesPhones", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all countries phone codes. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Phones List", + "schema": { "$ref": "#/definitions/phoneList" } + } + }, + "x-appwrite": { + "method": "getCountriesPhones", + "weight": 103, + "cookies": false, + "type": "", + "demo": "locale/get-countries-phones.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-countries-phones.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/currencies": { + "get": { + "summary": "List Currencies", + "operationId": "localeGetCurrencies", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.", + "responses": { + "200": { + "description": "Currencies List", + "schema": { "$ref": "#/definitions/currencyList" } + } + }, + "x-appwrite": { + "method": "getCurrencies", + "weight": 105, + "cookies": false, + "type": "", + "demo": "locale/get-currencies.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-currencies.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/locale/languages": { + "get": { + "summary": "List Languages", + "operationId": "localeGetLanguages", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["locale"], + "description": "List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.", + "responses": { + "200": { + "description": "Languages List", + "schema": { "$ref": "#/definitions/languageList" } + } + }, + "x-appwrite": { + "method": "getLanguages", + "weight": 106, + "cookies": false, + "type": "", + "demo": "locale/get-languages.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/locale/get-languages.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "locale.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }] + } + }, + "/storage/buckets": { + "get": { + "summary": "List buckets", + "operationId": "storageListBuckets", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a list of all the storage buckets. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Buckets List", + "schema": { "$ref": "#/definitions/bucketList" } + } + }, + "x-appwrite": { + "method": "listBuckets", + "weight": 151, + "cookies": false, + "type": "", + "demo": "storage/list-buckets.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-buckets.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Results offset. The default value is 0. Use this param to manage pagination.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create bucket", + "operationId": "storageCreateBucket", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Create a new storage bucket.", + "responses": { + "201": { + "description": "Bucket", + "schema": { "$ref": "#/definitions/bucket" } + } + }, + "x-appwrite": { + "method": "createBucket", + "weight": 150, + "cookies": false, + "type": "", + "demo": "storage/create-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "bucketId": { + "type": "string", + "description": "Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[BUCKET_ID]" + }, + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "file" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled?", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", + "default": 30000000, + "x-example": null + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + } + }, + "required": ["bucketId", "name", "permission"] + } + } + ] + } + }, + "/storage/buckets/{bucketId}": { + "get": { + "summary": "Get Bucket", + "operationId": "storageGetBucket", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.", + "responses": { + "200": { + "description": "Bucket", + "schema": { "$ref": "#/definitions/bucket" } + } + }, + "x-appwrite": { + "method": "getBucket", + "weight": 152, + "cookies": false, + "type": "", + "demo": "storage/get-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Bucket", + "operationId": "storageUpdateBucket", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Update a storage bucket by its unique ID.", + "responses": { + "200": { + "description": "Bucket", + "schema": { "$ref": "#/definitions/bucket" } + } + }, + "x-appwrite": { + "method": "updateBucket", + "weight": 153, + "cookies": false, + "type": "", + "demo": "storage/update-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Bucket name", + "default": null, + "x-example": "[NAME]" + }, + "permission": { + "type": "string", + "description": "Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "file" + }, + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "enabled": { + "type": "boolean", + "description": "Is bucket enabled?", + "default": true, + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)", + "default": null, + "x-example": null + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions", + "default": [], + "x-example": null, + "items": { "type": "string" } + }, + "encryption": { + "type": "boolean", + "description": "Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled", + "default": true, + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled", + "default": true, + "x-example": false + } + }, + "required": ["name", "permission"] + } + } + ] + }, + "delete": { + "summary": "Delete Bucket", + "operationId": "storageDeleteBucket", + "consumes": ["application/json"], + "produces": [], + "tags": ["storage"], + "description": "Delete a storage bucket by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteBucket", + "weight": 154, + "cookies": false, + "type": "", + "demo": "storage/delete-bucket.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-bucket.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "buckets.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Bucket unique ID.", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files": { + "get": { + "summary": "List Files", + "operationId": "storageListFiles", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Files List", + "schema": { "$ref": "#/definitions/fileList" } + } + }, + "x-appwrite": { + "method": "listFiles", + "weight": 156, + "cookies": false, + "type": "", + "demo": "storage/list-files.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/list-files.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create File", + "operationId": "storageCreateFile", + "consumes": ["multipart/form-data"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n", + "responses": { + "201": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "createFile", + "weight": 155, + "cookies": false, + "type": "upload", + "demo": "storage/create-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/create-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "required": true, + "x-upload-id": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "formData" + }, + { + "name": "file", + "description": "Binary file.", + "required": true, + "type": "file", + "in": "formData" + }, + { + "name": "read", + "description": "An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "x-example": "[\"role:all\"]", + "in": "formData" + }, + { + "name": "write", + "description": "An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { "type": "string" }, + "x-example": "[\"role:all\"]", + "in": "formData" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}": { + "get": { + "summary": "Get File", + "operationId": "storageGetFile", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.", + "responses": { + "200": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "getFile", + "weight": 157, + "cookies": false, + "type": "", + "demo": "storage/get-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update File", + "operationId": "storageUpdateFile", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["storage"], + "description": "Update a file by its unique ID. Only users with write permissions have access to update this resource.", + "responses": { + "200": { + "description": "File", + "schema": { "$ref": "#/definitions/file" } + } + }, + "x-appwrite": { + "method": "updateFile", + "weight": 161, + "cookies": false, + "type": "", + "demo": "storage/update-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/update-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File unique ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "read": { + "type": "array", + "description": "An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + }, + "write": { + "type": "array", + "description": "An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.", + "default": null, + "x-example": "[\"role:all\"]", + "items": { "type": "string" } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete File", + "operationId": "storageDeleteFile", + "consumes": ["application/json"], + "produces": [], + "tags": ["storage"], + "description": "Delete a file by its unique ID. Only users with write permissions have access to delete this resource.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteFile", + "weight": 162, + "cookies": false, + "type": "", + "demo": "storage/delete-file.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/delete-file.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/download": { + "get": { + "summary": "Get File for Download", + "operationId": "storageGetFileDownload", + "consumes": ["application/json"], + "produces": ["*/*"], + "tags": ["storage"], + "description": "Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.", + "responses": { + "200": { "description": "File", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFileDownload", + "weight": 159, + "cookies": false, + "type": "location", + "demo": "storage/get-file-download.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-download.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/preview": { + "get": { + "summary": "Get File Preview", + "operationId": "storageGetFilePreview", + "consumes": ["application/json"], + "produces": ["image/*"], + "tags": ["storage"], + "description": "Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.", + "responses": { + "200": { "description": "Image", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFilePreview", + "weight": 158, + "cookies": false, + "type": "location", + "demo": "storage/get-file-preview.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-preview.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + }, + { + "name": "width", + "description": "Resize preview image width, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "height", + "description": "Resize preview image height, Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "gravity", + "description": "Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right", + "required": false, + "type": "string", + "x-example": "center", + "default": "center", + "in": "query" + }, + { + "name": "quality", + "description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 100, + "in": "query" + }, + { + "name": "borderWidth", + "description": "Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "borderColor", + "description": "Preview image border color. Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "borderRadius", + "description": "Preview image border radius in pixels. Pass an integer between 0 to 4000.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "opacity", + "description": "Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.", + "required": false, + "type": "number", + "format": "float", + "x-example": 0, + "default": 1, + "in": "query" + }, + { + "name": "rotation", + "description": "Preview image rotation in degrees. Pass an integer between -360 and 360.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": -360, + "default": 0, + "in": "query" + }, + { + "name": "background", + "description": "Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.", + "required": false, + "type": "string", + "default": "", + "in": "query" + }, + { + "name": "output", + "description": "Output format type (jpeg, jpg, png, gif and webp).", + "required": false, + "type": "string", + "x-example": "jpg", + "default": "", + "in": "query" + } + ] + } + }, + "/storage/buckets/{bucketId}/files/{fileId}/view": { + "get": { + "summary": "Get File for View", + "operationId": "storageGetFileView", + "consumes": ["application/json"], + "produces": ["*/*"], + "tags": ["storage"], + "description": "Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.", + "responses": { + "200": { "description": "File", "schema": { "type": "file" } } + }, + "x-appwrite": { + "method": "getFileView", + "weight": 160, + "cookies": false, + "type": "location", + "demo": "storage/get-file-view.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/storage/get-file-view.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "files.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "bucketId", + "description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).", + "required": true, + "type": "string", + "x-example": "[BUCKET_ID]", + "in": "path" + }, + { + "name": "fileId", + "description": "File ID.", + "required": true, + "type": "string", + "x-example": "[FILE_ID]", + "in": "path" + } + ] + } + }, + "/teams": { + "get": { + "summary": "List Teams", + "operationId": "teamsList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin).", + "responses": { + "200": { + "description": "Teams List", + "schema": { "$ref": "#/definitions/teamList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 166, + "cookies": false, + "type": "", + "demo": "teams/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/list-teams.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Team", + "operationId": "teamsCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 165, + "cookies": false, + "type": "", + "demo": "teams/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[TEAM_ID]" + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", + "default": ["owner"], + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["teamId", "name"] + } + } + ] + } + }, + "/teams/{teamId}": { + "get": { + "summary": "Get Team", + "operationId": "teamsGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 167, + "cookies": false, + "type": "", + "demo": "teams/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + } + ] + }, + "put": { + "summary": "Update Team", + "operationId": "teamsUpdate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Update a team using its ID. Only members with the owner role can update the team.", + "responses": { + "200": { + "description": "Team", + "schema": { "$ref": "#/definitions/team" } + } + }, + "x-appwrite": { + "method": "update", + "weight": 168, + "cookies": false, + "type": "", + "demo": "teams/update.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + }, + "delete": { + "summary": "Delete Team", + "operationId": "teamsDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["teams"], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 169, + "cookies": false, + "type": "", + "demo": "teams/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + } + ] + } + }, + "/teams/{teamId}/memberships": { + "get": { + "summary": "Get Team Memberships", + "operationId": "teamsGetMemberships", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { "$ref": "#/definitions/membershipList" } + } + }, + "x-appwrite": { + "method": "getMemberships", + "weight": 171, + "cookies": false, + "type": "", + "demo": "teams/get-memberships.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-members.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create Team Membership", + "operationId": "teamsCreateMembership", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.", + "responses": { + "201": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "createMembership", + "weight": 170, + "cookies": false, + "type": "", + "demo": "teams/create-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/create-team-membership.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the new team member.", + "default": null, + "x-example": "email@example.com" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.", + "default": null, + "x-example": null, + "items": { "type": "string" } + }, + "url": { + "type": "string", + "description": "URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.", + "default": null, + "x-example": "https://example.com" + }, + "name": { + "type": "string", + "description": "Name of the new team member. Max length: 128 chars.", + "default": "", + "x-example": "[NAME]" + } + }, + "required": ["email", "roles", "url"] + } + } + ] + } + }, + "/teams/{teamId}/memberships/{membershipId}": { + "get": { + "summary": "Get Team Membership", + "operationId": "teamsGetMembership", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Get a team member by the membership unique id. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Memberships List", + "schema": { "$ref": "#/definitions/membershipList" } + } + }, + "x-appwrite": { + "method": "getMembership", + "weight": 172, + "cookies": false, + "type": "", + "demo": "teams/get-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/get-team-member.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update Membership Roles", + "operationId": "teamsUpdateMembershipRoles", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions).", + "responses": { + "200": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "updateMembershipRoles", + "weight": 173, + "cookies": false, + "type": "", + "demo": "teams/update-membership-roles.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-roles.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Max length for each role is 32 chars.", + "default": null, + "x-example": null, + "items": { "type": "string" } + } + }, + "required": ["roles"] + } + } + ] + }, + "delete": { + "summary": "Delete Team Membership", + "operationId": "teamsDeleteMembership", + "consumes": ["application/json"], + "produces": [], + "tags": ["teams"], + "description": "This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteMembership", + "weight": 175, + "cookies": false, + "type": "", + "demo": "teams/delete-membership.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/delete-team-membership.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": ["client", "server", "server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + } + ] + } + }, + "/teams/{teamId}/memberships/{membershipId}/status": { + "patch": { + "summary": "Update Team Membership Status", + "operationId": "teamsUpdateMembershipStatus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["teams"], + "description": "Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n", + "responses": { + "200": { + "description": "Membership", + "schema": { "$ref": "#/definitions/membership" } + } + }, + "x-appwrite": { + "method": "updateMembershipStatus", + "weight": 174, + "cookies": false, + "type": "", + "demo": "teams/update-membership-status.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/teams/update-team-membership-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "public", + "platforms": ["client", "server"], + "packaging": false, + "auth": { "Project": [], "JWT": [] } + }, + "security": [{ "Project": [], "JWT": [] }], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "type": "string", + "x-example": "[TEAM_ID]", + "in": "path" + }, + { + "name": "membershipId", + "description": "Membership ID.", + "required": true, + "type": "string", + "x-example": "[MEMBERSHIP_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID.", + "default": null, + "x-example": "[USER_ID]" + }, + "secret": { + "type": "string", + "description": "Secret key.", + "default": null, + "x-example": "[SECRET]" + } + }, + "required": ["userId", "secret"] + } + } + ] + } + }, + "/users": { + "get": { + "summary": "List Users", + "operationId": "usersList", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get a list of all the project's users. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Users List", + "schema": { "$ref": "#/definitions/userList" } + } + }, + "x-appwrite": { + "method": "list", + "weight": 177, + "cookies": false, + "type": "", + "demo": "users/list.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/list-users.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, + "type": "string", + "x-example": "[SEARCH]", + "default": "", + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + }, + { + "name": "cursor", + "description": "ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "string", + "x-example": "[CURSOR]", + "default": "", + "in": "query" + }, + { + "name": "cursorDirection", + "description": "Direction of the cursor.", + "required": false, + "type": "string", + "x-example": "after", + "default": "after", + "in": "query" + }, + { + "name": "orderType", + "description": "Order result by ASC or DESC order.", + "required": false, + "type": "string", + "x-example": "ASC", + "default": "ASC", + "in": "query" + } + ] + }, + "post": { + "summary": "Create User", + "operationId": "usersCreate", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Create a new user.", + "responses": { + "201": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "create", + "weight": 176, + "cookies": false, + "type": "", + "demo": "users/create.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/create-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "default": null, + "x-example": "[USER_ID]" + }, + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + }, + "password": { + "type": "string", + "description": "User password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + }, + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": "", + "x-example": "[NAME]" + } + }, + "required": ["userId", "email", "password"] + } + } + ] + } + }, + "/users/{userId}": { + "get": { + "summary": "Get User", + "operationId": "usersGet", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get a user by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "get", + "weight": 178, + "cookies": false, + "type": "", + "demo": "users/get.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete User", + "operationId": "usersDelete", + "consumes": ["application/json"], + "produces": [], + "tags": ["users"], + "description": "Delete a user by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "delete", + "weight": 190, + "cookies": false, + "type": "", + "demo": "users/delete.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + } + }, + "/users/{userId}/email": { + "patch": { + "summary": "Update Email", + "operationId": "usersUpdateEmail", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user email by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateEmail", + "weight": 186, + "cookies": false, + "type": "", + "demo": "users/update-email.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-email.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email.", + "default": null, + "x-example": "email@example.com" + } + }, + "required": ["email"] + } + } + ] + } + }, + "/users/{userId}/logs": { + "get": { + "summary": "Get User Logs", + "operationId": "usersGetLogs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get the user activity logs list by its unique ID.", + "responses": { + "200": { + "description": "Logs List", + "schema": { "$ref": "#/definitions/logList" } + } + }, + "x-appwrite": { + "method": "getLogs", + "weight": 181, + "cookies": false, + "type": "", + "demo": "users/get-logs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-logs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "limit", + "description": "Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 25, + "in": "query" + }, + { + "name": "offset", + "description": "Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)", + "required": false, + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0, + "in": "query" + } + ] + } + }, + "/users/{userId}/name": { + "patch": { + "summary": "Update Name", + "operationId": "usersUpdateName", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user name by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateName", + "weight": 184, + "cookies": false, + "type": "", + "demo": "users/update-name.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User name. Max length: 128 chars.", + "default": null, + "x-example": "[NAME]" + } + }, + "required": ["name"] + } + } + ] + } + }, + "/users/{userId}/password": { + "patch": { + "summary": "Update Password", + "operationId": "usersUpdatePassword", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user password by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updatePassword", + "weight": 185, + "cookies": false, + "type": "", + "demo": "users/update-password.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-password.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "New user password. Must be at least 8 chars.", + "default": null, + "x-example": "password" + } + }, + "required": ["password"] + } + } + ] + } + }, + "/users/{userId}/prefs": { + "get": { + "summary": "Get User Preferences", + "operationId": "usersGetPrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get the user preferences by its unique ID.", + "responses": { + "200": { + "description": "Preferences", + "schema": { "$ref": "#/definitions/preferences" } + } + }, + "x-appwrite": { + "method": "getPrefs", + "weight": 179, + "cookies": false, + "type": "", + "demo": "users/get-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + }, + "patch": { + "summary": "Update User Preferences", + "operationId": "usersUpdatePrefs", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.", + "responses": { + "200": { + "description": "Preferences", + "schema": { "$ref": "#/definitions/preferences" } + } + }, + "x-appwrite": { + "method": "updatePrefs", + "weight": 187, + "cookies": false, + "type": "", + "demo": "users/update-prefs.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-prefs.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "prefs": { + "type": "object", + "description": "Prefs key-value JSON object.", + "default": {}, + "x-example": "{}" + } + }, + "required": ["prefs"] + } + } + ] + } + }, + "/users/{userId}/sessions": { + "get": { + "summary": "Get User Sessions", + "operationId": "usersGetSessions", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Get the user sessions list by its unique ID.", + "responses": { + "200": { + "description": "Sessions List", + "schema": { "$ref": "#/definitions/sessionList" } + } + }, + "x-appwrite": { + "method": "getSessions", + "weight": 180, + "cookies": false, + "type": "", + "demo": "users/get-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/get-user-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.read", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete User Sessions", + "operationId": "usersDeleteSessions", + "consumes": ["application/json"], + "produces": [], + "tags": ["users"], + "description": "Delete all user's sessions by using the user's unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSessions", + "weight": 189, + "cookies": false, + "type": "", + "demo": "users/delete-sessions.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-sessions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + } + ] + } + }, + "/users/{userId}/sessions/{sessionId}": { + "delete": { + "summary": "Delete User Session", + "operationId": "usersDeleteSession", + "consumes": ["application/json"], + "produces": [], + "tags": ["users"], + "description": "Delete a user sessions by its unique ID.", + "responses": { "204": { "description": "No content" } }, + "x-appwrite": { + "method": "deleteSession", + "weight": 188, + "cookies": false, + "type": "", + "demo": "users/delete-session.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/delete-user-session.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "sessionId", + "description": "Session ID.", + "required": true, + "type": "string", + "x-example": "[SESSION_ID]", + "in": "path" + } + ] + } + }, + "/users/{userId}/status": { + "patch": { + "summary": "Update User Status", + "operationId": "usersUpdateStatus", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateStatus", + "weight": 182, + "cookies": false, + "type": "", + "demo": "users/update-status.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "User Status. To activate the user pass `true` and to block the user pass `false`.", + "default": null, + "x-example": false + } + }, + "required": ["status"] + } + } + ] + } + }, + "/users/{userId}/verification": { + "patch": { + "summary": "Update Email Verification", + "operationId": "usersUpdateVerification", + "consumes": ["application/json"], + "produces": ["application/json"], + "tags": ["users"], + "description": "Update the user email verification status by its unique ID.", + "responses": { + "200": { + "description": "User", + "schema": { "$ref": "#/definitions/user" } + } + }, + "x-appwrite": { + "method": "updateVerification", + "weight": 183, + "cookies": false, + "type": "", + "demo": "users/update-verification.md", + "edit": "https://github.com/appwrite/appwrite/edit/master/docs/references/users/update-user-verification.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": ["server"], + "packaging": false, + "auth": { "Project": [], "Key": [] } + }, + "security": [{ "Project": [], "Key": [] }], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "[USER_ID]", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "emailVerification": { + "type": "boolean", + "description": "User email verification status.", + "default": null, + "x-example": false + } + }, + "required": ["emailVerification"] + } + } + ] + } + } + }, + "tags": [ + { + "name": "account", + "description": "The Account service allows you to authenticate and manage a user account." + }, + { + "name": "avatars", + "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." + }, + { + "name": "database", + "description": "The Database service allows you to create structured collections of documents, query and filter lists of documents" + }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "health", + "description": "The Health service allows you to both validate and monitor your Appwrite server's health." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + } + ], + "definitions": { + "documentList": { + "description": "Documents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of documents documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "documents": { + "type": "array", + "description": "List of documents.", + "items": { "type": "object", "$ref": "#/definitions/document" }, + "x-example": "" + } + }, + "required": ["total", "documents"] + }, + "collectionList": { + "description": "Collections List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of collections documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "collections": { + "type": "array", + "description": "List of collections.", + "items": { "type": "object", "$ref": "#/definitions/collection" }, + "x-example": "" + } + }, + "required": ["total", "collections"] + }, + "indexList": { + "description": "Indexes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of indexes documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "indexes": { + "type": "array", + "description": "List of indexes.", + "items": { "type": "object", "$ref": "#/definitions/index" }, + "x-example": "" + } + }, + "required": ["total", "indexes"] + }, + "userList": { + "description": "Users List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of users documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "users": { + "type": "array", + "description": "List of users.", + "items": { "type": "object", "$ref": "#/definitions/user" }, + "x-example": "" + } + }, + "required": ["total", "users"] + }, + "sessionList": { + "description": "Sessions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of sessions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "sessions": { + "type": "array", + "description": "List of sessions.", + "items": { "type": "object", "$ref": "#/definitions/session" }, + "x-example": "" + } + }, + "required": ["total", "sessions"] + }, + "logList": { + "description": "Logs List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of logs documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "logs": { + "type": "array", + "description": "List of logs.", + "items": { "type": "object", "$ref": "#/definitions/log" }, + "x-example": "" + } + }, + "required": ["total", "logs"] + }, + "fileList": { + "description": "Files List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of files documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "files": { + "type": "array", + "description": "List of files.", + "items": { "type": "object", "$ref": "#/definitions/file" }, + "x-example": "" + } + }, + "required": ["total", "files"] + }, + "bucketList": { + "description": "Buckets List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of buckets documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "buckets": { + "type": "array", + "description": "List of buckets.", + "items": { "type": "object", "$ref": "#/definitions/bucket" }, + "x-example": "" + } + }, + "required": ["total", "buckets"] + }, + "teamList": { + "description": "Teams List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of teams documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "teams": { + "type": "array", + "description": "List of teams.", + "items": { "type": "object", "$ref": "#/definitions/team" }, + "x-example": "" + } + }, + "required": ["total", "teams"] + }, + "membershipList": { + "description": "Memberships List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of memberships documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "memberships": { + "type": "array", + "description": "List of memberships.", + "items": { "type": "object", "$ref": "#/definitions/membership" }, + "x-example": "" + } + }, + "required": ["total", "memberships"] + }, + "functionList": { + "description": "Functions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of functions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "functions": { + "type": "array", + "description": "List of functions.", + "items": { "type": "object", "$ref": "#/definitions/function" }, + "x-example": "" + } + }, + "required": ["total", "functions"] + }, + "runtimeList": { + "description": "Runtimes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of runtimes documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "runtimes": { + "type": "array", + "description": "List of runtimes.", + "items": { "type": "object", "$ref": "#/definitions/runtime" }, + "x-example": "" + } + }, + "required": ["total", "runtimes"] + }, + "deploymentList": { + "description": "Deployments List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of deployments documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "deployments": { + "type": "array", + "description": "List of deployments.", + "items": { "type": "object", "$ref": "#/definitions/deployment" }, + "x-example": "" + } + }, + "required": ["total", "deployments"] + }, + "executionList": { + "description": "Executions List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of executions documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "executions": { + "type": "array", + "description": "List of executions.", + "items": { "type": "object", "$ref": "#/definitions/execution" }, + "x-example": "" + } + }, + "required": ["total", "executions"] + }, + "countryList": { + "description": "Countries List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of countries documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "countries": { + "type": "array", + "description": "List of countries.", + "items": { "type": "object", "$ref": "#/definitions/country" }, + "x-example": "" + } + }, + "required": ["total", "countries"] + }, + "continentList": { + "description": "Continents List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of continents documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "continents": { + "type": "array", + "description": "List of continents.", + "items": { "type": "object", "$ref": "#/definitions/continent" }, + "x-example": "" + } + }, + "required": ["total", "continents"] + }, + "languageList": { + "description": "Languages List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of languages documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "languages": { + "type": "array", + "description": "List of languages.", + "items": { "type": "object", "$ref": "#/definitions/language" }, + "x-example": "" + } + }, + "required": ["total", "languages"] + }, + "currencyList": { + "description": "Currencies List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of currencies documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "currencies": { + "type": "array", + "description": "List of currencies.", + "items": { "type": "object", "$ref": "#/definitions/currency" }, + "x-example": "" + } + }, + "required": ["total", "currencies"] + }, + "phoneList": { + "description": "Phones List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of phones documents that matched your query.", + "x-example": 5, + "format": "int32" + }, + "phones": { + "type": "array", + "description": "List of phones.", + "items": { "type": "object", "$ref": "#/definitions/phone" }, + "x-example": "" + } + }, + "required": ["total", "phones"] + }, + "collection": { + "description": "Collection", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "Collection read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "Collection write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + }, + "name": { + "type": "string", + "description": "Collection name.", + "x-example": "My Collection" + }, + "enabled": { + "type": "boolean", + "description": "Collection enabled.", + "x-example": false + }, + "permission": { + "type": "string", + "description": "Collection permission model. Possible values: `document` or `collection`", + "x-example": "document" + }, + "attributes": { + "type": "array", + "description": "Collection attributes.", + "items": { + "x-anyOf": [ + { "$ref": "#/definitions/attributeBoolean" }, + { "$ref": "#/definitions/attributeInteger" }, + { "$ref": "#/definitions/attributeFloat" }, + { "$ref": "#/definitions/attributeEmail" }, + { "$ref": "#/definitions/attributeEnum" }, + { "$ref": "#/definitions/attributeUrl" }, + { "$ref": "#/definitions/attributeIp" }, + { "$ref": "#/definitions/attributeString" } + ] + }, + "x-example": {} + }, + "indexes": { + "type": "array", + "description": "Collection indexes.", + "items": { "type": "object", "$ref": "#/definitions/index" }, + "x-example": {} + } + }, + "required": [ + "$id", + "$read", + "$write", + "name", + "enabled", + "permission", + "attributes", + "indexes" + ] + }, + "attributeList": { + "description": "Attributes List", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of attributes in the given collection.", + "x-example": 5, + "format": "int32" + }, + "attributes": { + "type": "array", + "description": "List of attributes.", + "items": { + "x-anyOf": [ + { "$ref": "#/definitions/attributeBoolean" }, + { "$ref": "#/definitions/attributeInteger" }, + { "$ref": "#/definitions/attributeFloat" }, + { "$ref": "#/definitions/attributeEmail" }, + { "$ref": "#/definitions/attributeEnum" }, + { "$ref": "#/definitions/attributeUrl" }, + { "$ref": "#/definitions/attributeIp" }, + { "$ref": "#/definitions/attributeString" } + ] + }, + "x-example": "" + } + }, + "required": ["total", "attributes"] + }, + "attributeString": { + "description": "AttributeString", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "fullName" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "size": { + "type": "integer", + "description": "Attribute size.", + "x-example": 128, + "format": "int32" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "size"] + }, + "attributeInteger": { + "description": "AttributeInteger", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "count" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "integer" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "min": { + "type": "integer", + "description": "Minimum value to enforce for new documents.", + "x-example": 1, + "format": "int32", + "x-nullable": true + }, + "max": { + "type": "integer", + "description": "Maximum value to enforce for new documents.", + "x-example": 10, + "format": "int32", + "x-nullable": true + }, + "default": { + "type": "integer", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 10, + "format": "int32", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required"] + }, + "attributeFloat": { + "description": "AttributeFloat", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "percentageCompleted" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "double" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "min": { + "type": "number", + "description": "Minimum value to enforce for new documents.", + "x-example": 1.5, + "format": "double", + "x-nullable": true + }, + "max": { + "type": "number", + "description": "Maximum value to enforce for new documents.", + "x-example": 10.5, + "format": "double", + "x-nullable": true + }, + "default": { + "type": "number", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": 2.5, + "format": "double", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required"] + }, + "attributeBoolean": { + "description": "AttributeBoolean", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "isEnabled" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "boolean" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "default": { + "type": "boolean", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": false, + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required"] + }, + "attributeEmail": { + "description": "AttributeEmail", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "userEmail" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "email" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "default@example.com", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "format"] + }, + "attributeEnum": { + "description": "AttributeEnum", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "status" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "elements": { + "type": "array", + "description": "Array of elements in enumerated type.", + "items": { "type": "string" }, + "x-example": "element" + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "enum" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "element", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "elements", "format"] + }, + "attributeIp": { + "description": "AttributeIP", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "ipAddress" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "ip" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "192.0.2.0", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "format"] + }, + "attributeUrl": { + "description": "AttributeURL", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Attribute Key.", + "x-example": "githubUrl" + }, + "type": { + "type": "string", + "description": "Attribute type.", + "x-example": "string" + }, + "status": { + "type": "string", + "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "required": { + "type": "boolean", + "description": "Is attribute required?", + "x-example": true + }, + "array": { + "type": "boolean", + "description": "Is attribute an array?", + "x-example": false, + "x-nullable": true + }, + "format": { + "type": "string", + "description": "String format.", + "x-example": "url" + }, + "default": { + "type": "string", + "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", + "x-example": "http://example.com", + "x-nullable": true + } + }, + "required": ["key", "type", "status", "required", "format"] + }, + "index": { + "description": "Index", + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Index Key.", + "x-example": "index1" + }, + "type": { + "type": "string", + "description": "Index type.", + "x-example": "primary" + }, + "status": { + "type": "string", + "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", + "x-example": "available" + }, + "attributes": { + "type": "array", + "description": "Index attributes.", + "items": { "type": "string" }, + "x-example": [] + }, + "orders": { + "type": "array", + "description": "Index orders.", + "items": { "type": "string" }, + "x-example": [] + } + }, + "required": ["key", "type", "status", "attributes", "orders"] + }, + "document": { + "description": "Document", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Document ID.", + "x-example": "5e5ea5c16897e" + }, + "$collection": { + "type": "string", + "description": "Collection ID.", + "x-example": "5e5ea5c15117e" + }, + "$read": { + "type": "array", + "description": "Document read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "Document write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + } + }, + "additionalProperties": true, + "required": ["$id", "$collection", "$read", "$write"] + }, + "log": { + "description": "Log", + "type": "object", + "properties": { + "event": { + "type": "string", + "description": "Event name.", + "x-example": "account.sessions.create" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "610fc2f985ee0" + }, + "userEmail": { + "type": "string", + "description": "User Email.", + "x-example": "john@appwrite.io" + }, + "userName": { + "type": "string", + "description": "User Name.", + "x-example": "John Doe" + }, + "mode": { + "type": "string", + "description": "API mode when event triggered.", + "x-example": "admin" + }, + "ip": { + "type": "string", + "description": "IP session in use when the session was created.", + "x-example": "127.0.0.1" + }, + "time": { + "type": "integer", + "description": "Log creation time in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": [ + "event", + "userId", + "userEmail", + "userName", + "mode", + "ip", + "time", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName" + ] + }, + "user": { + "description": "User", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "John Doe" + }, + "registration": { + "type": "integer", + "description": "User registration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "x-example": true + }, + "passwordUpdate": { + "type": "integer", + "description": "Unix timestamp of the most recent password update", + "x-example": 1592981250, + "format": "int32" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "x-example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "x-example": { "theme": "pink", "timezone": "UTC" }, + "items": { "type": "object", "$ref": "#/definitions/preferences" } + } + }, + "required": [ + "$id", + "name", + "registration", + "status", + "passwordUpdate", + "email", + "emailVerification", + "prefs" + ] + }, + "preferences": { + "description": "Preferences", + "type": "object", + "additionalProperties": true + }, + "session": { + "description": "Session", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Session ID.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5bb8c16897e" + }, + "expire": { + "type": "integer", + "description": "Session expiration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "provider": { + "type": "string", + "description": "Session Provider.", + "x-example": "email" + }, + "providerUid": { + "type": "string", + "description": "Session Provider User ID.", + "x-example": "user@example.com" + }, + "providerAccessToken": { + "type": "string", + "description": "Session Provider Access Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "providerAccessTokenExpiry": { + "type": "integer", + "description": "Date, the Unix timestamp of when the access token expires.", + "x-example": 1592981250, + "format": "int32" + }, + "providerRefreshToken": { + "type": "string", + "description": "Session Provider Refresh Token.", + "x-example": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3" + }, + "ip": { + "type": "string", + "description": "IP in use when the session was created.", + "x-example": "127.0.0.1" + }, + "osCode": { + "type": "string", + "description": "Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).", + "x-example": "Mac" + }, + "osName": { + "type": "string", + "description": "Operating system name.", + "x-example": "Mac" + }, + "osVersion": { + "type": "string", + "description": "Operating system version.", + "x-example": "Mac" + }, + "clientType": { + "type": "string", + "description": "Client type.", + "x-example": "browser" + }, + "clientCode": { + "type": "string", + "description": "Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).", + "x-example": "CM" + }, + "clientName": { + "type": "string", + "description": "Client name.", + "x-example": "Chrome Mobile iOS" + }, + "clientVersion": { + "type": "string", + "description": "Client version.", + "x-example": "84.0" + }, + "clientEngine": { + "type": "string", + "description": "Client engine name.", + "x-example": "WebKit" + }, + "clientEngineVersion": { + "type": "string", + "description": "Client engine name.", + "x-example": "605.1.15" + }, + "deviceName": { + "type": "string", + "description": "Device name.", + "x-example": "smartphone" + }, + "deviceBrand": { + "type": "string", + "description": "Device brand name.", + "x-example": "Google" + }, + "deviceModel": { + "type": "string", + "description": "Device model name.", + "x-example": "Nexus 5" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "current": { + "type": "boolean", + "description": "Returns true if this the current user session.", + "x-example": true + } + }, + "required": [ + "$id", + "userId", + "expire", + "provider", + "providerUid", + "providerAccessToken", + "providerAccessTokenExpiry", + "providerRefreshToken", + "ip", + "osCode", + "osName", + "osVersion", + "clientType", + "clientCode", + "clientName", + "clientVersion", + "clientEngine", + "clientEngineVersion", + "deviceName", + "deviceBrand", + "deviceModel", + "countryCode", + "countryName", + "current" + ] + }, + "token": { + "description": "Token", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Token ID.", + "x-example": "bb8ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c168bb8" + }, + "secret": { + "type": "string", + "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.", + "x-example": "" + }, + "expire": { + "type": "integer", + "description": "Token expiration date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + } + }, + "required": ["$id", "userId", "secret", "expire"] + }, + "locale": { + "description": "Locale", + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "User IP address.", + "x-example": "127.0.0.1" + }, + "countryCode": { + "type": "string", + "description": "Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format", + "x-example": "US" + }, + "country": { + "type": "string", + "description": "Country name. This field support localization.", + "x-example": "United States" + }, + "continentCode": { + "type": "string", + "description": "Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.", + "x-example": "NA" + }, + "continent": { + "type": "string", + "description": "Continent name. This field support localization.", + "x-example": "North America" + }, + "eu": { + "type": "boolean", + "description": "True if country is part of the Europian Union.", + "x-example": false + }, + "currency": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format", + "x-example": "USD" + } + }, + "required": [ + "ip", + "countryCode", + "country", + "continentCode", + "continent", + "eu", + "currency" + ] + }, + "file": { + "description": "File", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "File ID.", + "x-example": "5e5ea5c16897e" + }, + "bucketId": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "File read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "$write": { + "type": "array", + "description": "File write permissions.", + "items": { "type": "string" }, + "x-example": "user:608f9da25e7e1" + }, + "name": { + "type": "string", + "description": "File name.", + "x-example": "Pink.png" + }, + "dateCreated": { + "type": "integer", + "description": "File creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "signature": { + "type": "string", + "description": "File MD5 signature.", + "x-example": "5d529fd02b544198ae075bd57c1762bb" + }, + "mimeType": { + "type": "string", + "description": "File mime type.", + "x-example": "image/png" + }, + "sizeOriginal": { + "type": "integer", + "description": "File original size in bytes.", + "x-example": 17890, + "format": "int32" + }, + "chunksTotal": { + "type": "integer", + "description": "Total number of chunks available", + "x-example": 17890, + "format": "int32" + }, + "chunksUploaded": { + "type": "integer", + "description": "Total number of chunks uploaded", + "x-example": 17890, + "format": "int32" + } + }, + "required": [ + "$id", + "bucketId", + "$read", + "$write", + "name", + "dateCreated", + "signature", + "mimeType", + "sizeOriginal", + "chunksTotal", + "chunksUploaded" + ] + }, + "bucket": { + "description": "Bucket", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Bucket ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "File read permissions.", + "items": { "type": "string" }, + "x-example": ["role:all"] + }, + "$write": { + "type": "array", + "description": "File write permissions.", + "items": { "type": "string" }, + "x-example": ["user:608f9da25e7e1"] + }, + "permission": { + "type": "string", + "description": "Bucket permission model. Possible values: `bucket` or `file`", + "x-example": "file" + }, + "dateCreated": { + "type": "integer", + "description": "Bucket creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "dateUpdated": { + "type": "integer", + "description": "Bucket update date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "name": { + "type": "string", + "description": "Bucket name.", + "x-example": "Documents" + }, + "enabled": { + "type": "boolean", + "description": "Bucket enabled.", + "x-example": false + }, + "maximumFileSize": { + "type": "integer", + "description": "Maximum file size supported.", + "x-example": 100, + "format": "int32" + }, + "allowedFileExtensions": { + "type": "array", + "description": "Allowed file extensions.", + "items": { "type": "string" }, + "x-example": ["jpg", "png"] + }, + "encryption": { + "type": "boolean", + "description": "Bucket is encrypted.", + "x-example": false + }, + "antivirus": { + "type": "boolean", + "description": "Virus scanning is enabled.", + "x-example": false + } + }, + "required": [ + "$id", + "$read", + "$write", + "permission", + "dateCreated", + "dateUpdated", + "name", + "enabled", + "maximumFileSize", + "allowedFileExtensions", + "encryption", + "antivirus" + ] + }, + "team": { + "description": "Team", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "Team name.", + "x-example": "VIP" + }, + "dateCreated": { + "type": "integer", + "description": "Team creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total number of team members.", + "x-example": 7, + "format": "int32" + } + }, + "required": ["$id", "name", "dateCreated", "total"] + }, + "membership": { + "description": "Membership", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Membership ID.", + "x-example": "5e5ea5c16897e" + }, + "userId": { + "type": "string", + "description": "User ID.", + "x-example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "Team ID.", + "x-example": "5e5ea5c16897e" + }, + "name": { + "type": "string", + "description": "User name.", + "x-example": "VIP" + }, + "email": { + "type": "string", + "description": "User email address.", + "x-example": "john@appwrite.io" + }, + "invited": { + "type": "integer", + "description": "Date, the user has been invited to join the team in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "joined": { + "type": "integer", + "description": "Date, the user has accepted the invitation to join the team in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "confirm": { + "type": "boolean", + "description": "User confirmation status, true if the user has joined the team or false otherwise.", + "x-example": false + }, + "roles": { + "type": "array", + "description": "User list of roles", + "items": { "type": "string" }, + "x-example": "admin" + } + }, + "required": [ + "$id", + "userId", + "teamId", + "name", + "email", + "invited", + "joined", + "confirm", + "roles" + ] + }, + "function": { + "description": "Function", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea5c16897e" + }, + "execute": { + "type": "array", + "description": "Execution permissions.", + "items": { "type": "string" }, + "x-example": "role:member" + }, + "name": { + "type": "string", + "description": "Function name.", + "x-example": "My Function" + }, + "dateCreated": { + "type": "integer", + "description": "Function creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "dateUpdated": { + "type": "integer", + "description": "Function update date in Unix timestamp.", + "x-example": 1592981257, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Function status. Possible values: `disabled`, `enabled`", + "x-example": "enabled" + }, + "runtime": { + "type": "string", + "description": "Function execution runtime.", + "x-example": "python-3.8" + }, + "deployment": { + "type": "string", + "description": "Function's active deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "vars": { + "type": "object", + "additionalProperties": true, + "description": "Function environment variables.", + "x-example": { "key": "value" } + }, + "events": { + "type": "array", + "description": "Function trigger events.", + "items": { "type": "string" }, + "x-example": "account.create" + }, + "schedule": { + "type": "string", + "description": "Function execution schedult in CRON format.", + "x-example": "5 4 * * *" + }, + "scheduleNext": { + "type": "integer", + "description": "Function next scheduled execution date in Unix timestamp.", + "x-example": 1592981292, + "format": "int32" + }, + "schedulePrevious": { + "type": "integer", + "description": "Function next scheduled execution date in Unix timestamp.", + "x-example": 1592981237, + "format": "int32" + }, + "timeout": { + "type": "integer", + "description": "Function execution timeout in seconds.", + "x-example": 1592981237, + "format": "int32" + } + }, + "required": [ + "$id", + "execute", + "name", + "dateCreated", + "dateUpdated", + "status", + "runtime", + "deployment", + "vars", + "events", + "schedule", + "scheduleNext", + "schedulePrevious", + "timeout" + ] + }, + "runtime": { + "description": "Runtime", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Runtime ID.", + "x-example": "python-3.8" + }, + "name": { + "type": "string", + "description": "Runtime Name.", + "x-example": "Python" + }, + "version": { + "type": "string", + "description": "Runtime version.", + "x-example": "3.8" + }, + "base": { + "type": "string", + "description": "Base Docker image used to build the runtime.", + "x-example": "python:3.8-alpine" + }, + "image": { + "type": "string", + "description": "Image name of Docker Hub.", + "x-example": "appwrite\\/runtime-for-python:3.8" + }, + "logo": { + "type": "string", + "description": "Name of the logo image.", + "x-example": "python.png" + }, + "supports": { + "type": "array", + "description": "List of supported architectures.", + "items": { "type": "string" }, + "x-example": "amd64" + } + }, + "required": [ + "$id", + "name", + "version", + "base", + "image", + "logo", + "supports" + ] + }, + "deployment": { + "description": "Deployment", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Deployment ID.", + "x-example": "5e5ea5c16897e" + }, + "resourceId": { + "type": "string", + "description": "Resource ID.", + "x-example": "5e5ea6g16897e" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "x-example": "functions" + }, + "dateCreated": { + "type": "integer", + "description": "The deployment creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "entrypoint": { + "type": "string", + "description": "The entrypoint file to use to execute the deployment code.", + "x-example": "enabled" + }, + "size": { + "type": "integer", + "description": "The code size in bytes.", + "x-example": 128, + "format": "int32" + }, + "buildId": { + "type": "string", + "description": "The current build ID.", + "x-example": "5e5ea5c16897e" + }, + "activate": { + "type": "boolean", + "description": "Whether the deployment should be automatically activated.", + "x-example": true + }, + "status": { + "type": "string", + "description": "The deployment status.", + "x-example": "enabled" + }, + "buildStdout": { + "type": "string", + "description": "The build stdout.", + "x-example": "enabled" + }, + "buildStderr": { + "type": "string", + "description": "The build stderr.", + "x-example": "enabled" + } + }, + "required": [ + "$id", + "resourceId", + "resourceType", + "dateCreated", + "entrypoint", + "size", + "buildId", + "activate", + "status", + "buildStdout", + "buildStderr" + ] + }, + "execution": { + "description": "Execution", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Execution ID.", + "x-example": "5e5ea5c16897e" + }, + "$read": { + "type": "array", + "description": "Execution read permissions.", + "items": { "type": "string" }, + "x-example": "role:all" + }, + "functionId": { + "type": "string", + "description": "Function ID.", + "x-example": "5e5ea6g16897e" + }, + "dateCreated": { + "type": "integer", + "description": "The execution creation date in Unix timestamp.", + "x-example": 1592981250, + "format": "int32" + }, + "trigger": { + "type": "string", + "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", + "x-example": "http" + }, + "status": { + "type": "string", + "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", + "x-example": "processing" + }, + "statusCode": { + "type": "integer", + "description": "The script status code.", + "x-example": 0, + "format": "int32" + }, + "stdout": { + "type": "string", + "description": "The script stdout output string. Logs the last 4,000 characters of the execution stdout output.", + "x-example": "" + }, + "stderr": { + "type": "string", + "description": "The script stderr output string. Logs the last 4,000 characters of the execution stderr output", + "x-example": "" + }, + "time": { + "type": "number", + "description": "The script execution time in seconds.", + "x-example": 0.4, + "format": "double" + } + }, + "required": [ + "$id", + "$read", + "functionId", + "dateCreated", + "trigger", + "status", + "statusCode", + "stdout", + "stderr", + "time" + ] + }, + "country": { + "description": "Country", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + }, + "code": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + } + }, + "required": ["name", "code"] + }, + "continent": { + "description": "Continent", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Continent name.", + "x-example": "Europe" + }, + "code": { + "type": "string", + "description": "Continent two letter code.", + "x-example": "EU" + } + }, + "required": ["name", "code"] + }, + "language": { + "description": "Language", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Language name.", + "x-example": "Italian" + }, + "code": { + "type": "string", + "description": "Language two-character ISO 639-1 codes.", + "x-example": "it" + }, + "nativeName": { + "type": "string", + "description": "Language native name.", + "x-example": "Italiano" + } + }, + "required": ["name", "code", "nativeName"] + }, + "currency": { + "description": "Currency", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Currency symbol.", + "x-example": "$" + }, + "name": { + "type": "string", + "description": "Currency name.", + "x-example": "US dollar" + }, + "symbolNative": { + "type": "string", + "description": "Currency native symbol.", + "x-example": "$" + }, + "decimalDigits": { + "type": "integer", + "description": "Number of decimal digits.", + "x-example": 2, + "format": "int32" + }, + "rounding": { + "type": "number", + "description": "Currency digit rounding.", + "x-example": 0, + "format": "double" + }, + "code": { + "type": "string", + "description": "Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.", + "x-example": "USD" + }, + "namePlural": { + "type": "string", + "description": "Currency plural name", + "x-example": "US dollars" + } + }, + "required": [ + "symbol", + "name", + "symbolNative", + "decimalDigits", + "rounding", + "code", + "namePlural" + ] + }, + "phone": { + "description": "Phone", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Phone code.", + "x-example": "+1" + }, + "countryCode": { + "type": "string", + "description": "Country two-character ISO 3166-1 alpha code.", + "x-example": "US" + }, + "countryName": { + "type": "string", + "description": "Country name.", + "x-example": "United States" + } + }, + "required": ["code", "countryCode", "countryName"] + }, + "healthAntivirus": { + "description": "Health Antivirus", + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Antivirus version.", + "x-example": "1.0.0" + }, + "status": { + "type": "string", + "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "x-example": "online" + } + }, + "required": ["version", "status"] + }, + "healthQueue": { + "description": "Health Queue", + "type": "object", + "properties": { + "size": { + "type": "integer", + "description": "Amount of actions in the queue.", + "x-example": 8, + "format": "int32" + } + }, + "required": ["size"] + }, + "healthStatus": { + "description": "Health Status", + "type": "object", + "properties": { + "ping": { + "type": "integer", + "description": "Duration in milliseconds how long the health check took.", + "x-example": 128, + "format": "int32" + }, + "status": { + "type": "string", + "description": "Service status. Possible values can are: `pass`, `fail`", + "x-example": "pass" + } + }, + "required": ["ping", "status"] + }, + "healthTime": { + "description": "Health Time", + "type": "object", + "properties": { + "remoteTime": { + "type": "integer", + "description": "Current unix timestamp on trustful remote server.", + "x-example": 1639490751, + "format": "int32" + }, + "localTime": { + "type": "integer", + "description": "Current unix timestamp of local server where Appwrite runs.", + "x-example": 1639490844, + "format": "int32" + }, + "diff": { + "type": "integer", + "description": "Difference of unix remote and local timestamps in milliseconds.", + "x-example": 93, + "format": "int32" + } + }, + "required": ["remoteTime", "localTime", "diff"] + } + }, + "externalDocs": { + "description": "Full API docs, specs and tutorials", + "url": "https://appwrite.io/docs" + } +} From 51c9165bacf7276736f10e8c112c14d635842a17 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 13 Apr 2022 10:11:31 +0000 Subject: [PATCH 64/73] Fix 'magic URL' accounts from not being able to create a new account. --- app/controllers/api/account.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index f0c10dd5ea..8df1244c63 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -675,7 +675,7 @@ App::post('/v1/account/sessions/magic-url') 'emailVerification' => false, 'status' => true, 'password' => null, - 'passwordUpdate' => \time(), + 'passwordUpdate' => 0, 'registration' => \time(), 'reset' => false, 'prefs' => new \stdClass(), @@ -946,7 +946,7 @@ App::post('/v1/account/sessions/anonymous') 'emailVerification' => false, 'status' => true, 'password' => null, - 'passwordUpdate' => \time(), + 'passwordUpdate' => 0, 'registration' => \time(), 'reset' => false, 'name' => null, @@ -1376,6 +1376,7 @@ App::patch('/v1/account/password') /** @var Appwrite\Stats\Stats $usage */ // Check old password only if its an existing user. + if ($user->getAttribute('passwordUpdate') !== 0 && !Auth::passwordVerify($oldPassword, $user->getAttribute('password'))) { // Double check user password throw new Exception('Invalid credentials', 401, Exception::USER_INVALID_CREDENTIALS); } From 37d0de8291f5e97e307f70344608652dad96e012 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 13 Apr 2022 10:27:58 +0000 Subject: [PATCH 65/73] Add tests --- tests/e2e/Services/Account/AccountBase.php | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index 1bb489c0a1..cca6c8ff72 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -1327,6 +1327,7 @@ trait AccountBase $data['token'] = $token; $data['id'] = $userId; + $data['email'] = $email; return $data; } @@ -1357,6 +1358,9 @@ trait AccountBase $this->assertNotEmpty($response['body']['$id']); $this->assertNotEmpty($response['body']['userId']); + $sessionId = $response['body']['$id']; + $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_'.$this->getProject()['$id']]; + /** * Test for FAILURE */ @@ -1382,6 +1386,102 @@ trait AccountBase $this->assertEquals(401, $response['headers']['status-code']); + + $data['sessionId'] = $sessionId; + $data['session'] = $session; + return $data; } + + /** + * @depends testCreateSessionWithMagicUrl + */ + public function testUpdateAccountPasswordWithMagicUrl($data):array + { + $email = $data['email'] ?? ''; + $session = $data['session'] ?? ''; + + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_PATCH, '/account/password', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + ]), [ + 'password' => 'new-password' + ]); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertIsArray($response['body']); + $this->assertNotEmpty($response['body']); + $this->assertNotEmpty($response['body']['$id']); + $this->assertIsNumeric($response['body']['registration']); + $this->assertEquals($response['body']['email'], $email); + + $response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ]), [ + 'email' => $email, + 'password' => 'new-password', + ]); + + $this->assertEquals($response['headers']['status-code'], 201); + + /** + * Test for FAILURE + */ + $response = $this->client->call(Client::METHOD_PATCH, '/account/password', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ])); + + $this->assertEquals($response['headers']['status-code'], 401); + + $response = $this->client->call(Client::METHOD_PATCH, '/account/password', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + ]), [ + ]); + + $this->assertEquals($response['headers']['status-code'], 400); + + /** + * Existing user tries to update password by passing wrong old password -> SHOULD FAIL + */ + $response = $this->client->call(Client::METHOD_PATCH, '/account/password', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + ]), [ + 'password' => 'new-password', + 'oldPassword' => 'wrong-password', + ]); + $this->assertEquals($response['headers']['status-code'], 401); + + /** + * Existing user tries to update password without passing old password -> SHOULD FAIL + */ + $response = $this->client->call(Client::METHOD_PATCH, '/account/password', array_merge([ + 'origin' => 'http://localhost', + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session, + ]), [ + 'password' => 'new-password' + ]); + $this->assertEquals($response['headers']['status-code'], 401); + + $data['password'] = 'new-password'; + + return $data; + } + } \ No newline at end of file From 812249ebcb677bbc46be071e9f22e25a1e221732 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 13 Apr 2022 10:45:17 +0000 Subject: [PATCH 66/73] update account.php --- app/controllers/api/account.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 8df1244c63..007e53193b 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1376,7 +1376,6 @@ App::patch('/v1/account/password') /** @var Appwrite\Stats\Stats $usage */ // Check old password only if its an existing user. - if ($user->getAttribute('passwordUpdate') !== 0 && !Auth::passwordVerify($oldPassword, $user->getAttribute('password'))) { // Double check user password throw new Exception('Invalid credentials', 401, Exception::USER_INVALID_CREDENTIALS); } From 8ebe3ae7ca69bf02792568975409d0035237f903 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 13 Apr 2022 13:00:43 +0100 Subject: [PATCH 67/73] Update Docs for update password --- docs/references/account/update-password.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/account/update-password.md b/docs/references/account/update-password.md index c682030a10..d912c9d439 100644 --- a/docs/references/account/update-password.md +++ b/docs/references/account/update-password.md @@ -1 +1 @@ -Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional. \ No newline at end of file +Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional. \ No newline at end of file From bae4eb89597fd622c48c37f92f82cb1ad1b3ed91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 13 Apr 2022 14:02:29 +0000 Subject: [PATCH 68/73] Update session docs --- docs/references/account/update-session.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/references/account/update-session.md diff --git a/docs/references/account/update-session.md b/docs/references/account/update-session.md new file mode 100644 index 0000000000..e2789fd88d --- /dev/null +++ b/docs/references/account/update-session.md @@ -0,0 +1 @@ +If session was created using OAuth provider, this method will renew access token. \ No newline at end of file From 54f8556f95a7eb6f53c8c159ee129cf73bc738bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 13 Apr 2022 14:44:21 +0000 Subject: [PATCH 69/73] Review changes --- docs/references/account/update-session.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/account/update-session.md b/docs/references/account/update-session.md index e2789fd88d..98080fda55 100644 --- a/docs/references/account/update-session.md +++ b/docs/references/account/update-session.md @@ -1 +1 @@ -If session was created using OAuth provider, this method will renew access token. \ No newline at end of file +Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to "refresh" the access token. \ No newline at end of file From e37d1be6a60f2b3483210fd162d28efc14717048 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 13 Apr 2022 18:15:25 +0200 Subject: [PATCH 70/73] * Move default host value from code to env variables * Add validation for host value --- .env | 2 +- Dockerfile | 2 +- app/controllers/api/functions.php | 2 +- app/workers/builds.php | 2 +- app/workers/deletes.php | 4 ++-- app/workers/functions.php | 2 +- src/Executor/Executor.php | 12 ++++-------- 7 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.env b/.env index dac72357ba..1b35cca898 100644 --- a/.env +++ b/.env @@ -56,7 +56,7 @@ _APP_FUNCTIONS_MEMORY_SWAP=0 _APP_FUNCTIONS_INACTIVE_THRESHOLD=60 OPEN_RUNTIMES_NETWORK=appwrite_runtimes _APP_EXECUTOR_SECRET=your-secret-key -_APP_EXECUTOR_HOST= +_APP_EXECUTOR_HOST=http://appwrite-executor/v1 _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 _APP_MAINTENANCE_RETENTION_ABUSE=86400 diff --git a/Dockerfile b/Dockerfile index cb9f4e0c14..ba4c72ac40 100755 --- a/Dockerfile +++ b/Dockerfile @@ -185,7 +185,7 @@ ENV _APP_SERVER=swoole \ _APP_FUNCTIONS_MEMORY=128 \ _APP_FUNCTIONS_MEMORY_SWAP=128 \ _APP_EXECUTOR_SECRET=a-random-secret \ - _APP_EXECUTOR_HOST= \ + _APP_EXECUTOR_HOST=http://appwrite-executor/v1 \ _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION \ diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 6c2cf53290..da65d4deb4 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -938,7 +938,7 @@ App::post('/v1/functions/:functionId/executions') ]); /** Execute function */ - $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); $executionResponse = []; try { $executionResponse = $executor->createExecution( diff --git a/app/workers/builds.php b/app/workers/builds.php index a2665d0683..031ffd84c3 100644 --- a/app/workers/builds.php +++ b/app/workers/builds.php @@ -33,7 +33,7 @@ class BuildsV1 extends Worker } public function init(): void { - $this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); + $this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); } public function run(): void diff --git a/app/workers/deletes.php b/app/workers/deletes.php index d8aaf26e5a..b8a44ebb82 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -368,7 +368,7 @@ class DeletesV1 extends Worker * Request executor to delete all deployment containers */ Console::info("Requesting executor to delete all deployment containers for function " . $functionId); - $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); foreach ($deploymentIds as $deploymentId) { try { $executor->deleteRuntime($projectId, $deploymentId); @@ -420,7 +420,7 @@ class DeletesV1 extends Worker */ Console::info("Requesting executor to delete deployment container for deployment " . $deploymentId); try { - $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); + $executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); $executor->deleteRuntime($projectId, $deploymentId); } catch (Throwable $th) { Console::error($th->getMessage()); diff --git a/app/workers/functions.php b/app/workers/functions.php index 9bccc43a66..66464a9d23 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -37,7 +37,7 @@ class FunctionsV1 extends Worker public function init(): void { - $this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST', 'http://appwrite-executor/v1')); + $this->executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); } public function run(): void diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index bebba919c4..300e1a7a9b 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -18,8 +18,6 @@ class Executor const METHOD_CONNECT = 'CONNECT'; const METHOD_TRACE = 'TRACE'; - const DEFAULT_HOST = 'http://appwrite-executor/v1'; - private $endpoint; private $selfSigned = false; @@ -28,14 +26,12 @@ class Executor 'content-type' => '', ]; - public function __construct(string $endpoint = self::DEFAULT_HOST) + public function __construct(string $endpoint) { - if (empty($endpoint)) { - Console::warning('Undefined Executor host (fallback to ' . self::DEFAULT_HOST . ')'); - $this->endpoint = self::DEFAULT_HOST; - } else { - $this->endpoint = $endpoint; + if (!filter_var($endpoint, FILTER_VALIDATE_URL)) { + throw new Exception('Unsupported endpoint'); } + $this->endpoint = $endpoint; } /** From e567b68c199f00f26fb2929b600874c3ceff7b6e Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Thu, 14 Apr 2022 09:54:29 +0000 Subject: [PATCH 71/73] Rename 'providers' to 'authProviders' --- CHANGES.md | 3 +++ app/config/collections.php | 2 +- app/controllers/api/account.php | 12 ++++++------ app/controllers/api/projects.php | 6 +++--- src/Appwrite/Utopia/Response/Model/Project.php | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 10034c4953..7580ccb114 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +# Unreleased Version +- Renamed `providers` to `authProviders` in project collection **Breaking Change** + # Version 0.13.4 ## Features diff --git a/app/config/collections.php b/app/config/collections.php index 98f41e8833..3e3de4c7bd 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -512,7 +512,7 @@ $collections = [ 'filters' => ['json'], ], [ - '$id' => 'providers', + '$id' => 'authProviders', 'type' => Database::VAR_STRING, 'format' => '', 'size' => 16384, diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index f0c10dd5ea..5d77b9c68a 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -274,8 +274,8 @@ App::get('/v1/account/sessions/oauth2/:provider') $protocol = $request->getProtocol(); $callback = $protocol.'://'.$request->getHostname().'/v1/account/sessions/oauth2/callback/'.$provider.'/'.$project->getId(); - $appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? ''; - $appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}'; + $appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? ''; + $appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}'; if (!empty($appSecret) && isset($appSecret['version'])) { $key = App::getEnv('_APP_OPENSSL_KEY_V' . $appSecret['version']); @@ -396,8 +396,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') $callback = $protocol . '://' . $request->getHostname() . '/v1/account/sessions/oauth2/callback/' . $provider . '/' . $project->getId(); $defaultState = ['success' => $project->getAttribute('url', ''), 'failure' => '']; $validateURL = new URL(); - $appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? ''; - $appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}'; + $appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? ''; + $appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}'; if (!empty($appSecret) && isset($appSecret['version'])) { $key = App::getEnv('_APP_OPENSSL_KEY_V' . $appSecret['version']); @@ -1710,8 +1710,8 @@ App::patch('/v1/account/sessions/:sessionId') $provider = $session->getAttribute('provider'); $refreshToken = $session->getAttribute('providerRefreshToken'); - $appId = $project->getAttribute('providers', [])[$provider.'Appid'] ?? ''; - $appSecret = $project->getAttribute('providers', [])[$provider.'Secret'] ?? '{}'; + $appId = $project->getAttribute('authProviders', [])[$provider.'Appid'] ?? ''; + $appSecret = $project->getAttribute('authProviders', [])[$provider.'Secret'] ?? '{}'; $className = 'Appwrite\\Auth\\OAuth2\\'.\ucfirst($provider); diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index f172bc37ec..f7100a88a2 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -95,7 +95,7 @@ App::post('/v1/projects') 'legalTaxId' => $legalTaxId, 'services' => new stdClass(), 'platforms' => null, - 'providers' => [], + 'authProviders' => [], 'webhooks' => null, 'keys' => null, 'domains' => null, @@ -447,11 +447,11 @@ App::patch('/v1/projects/:projectId/oauth2') throw new Exception('Project not found', 404, Exception::PROJECT_NOT_FOUND); } - $providers = $project->getAttribute('providers', []); + $providers = $project->getAttribute('authProviders', []); $providers[$provider . 'Appid'] = $appId; $providers[$provider . 'Secret'] = $secret; - $project = $dbForConsole->updateDocument('projects', $project->getId(), $project->setAttribute('providers', $providers)); + $project = $dbForConsole->updateDocument('projects', $project->getId(), $project->setAttribute('authProviders', $providers)); $response->dynamic($project, Response::MODEL_PROJECT); }); diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php index fb7ee01380..9071966e3b 100644 --- a/src/Appwrite/Utopia/Response/Model/Project.php +++ b/src/Appwrite/Utopia/Response/Model/Project.php @@ -236,7 +236,7 @@ class Project extends Model } $providers = Config::getParam('providers', []); - $providerValues = $document->getAttribute('providers', []); + $providerValues = $document->getAttribute('authProviders', []); foreach ($providers as $key => $provider) { if (!$provider['enabled']) { From b153b4b07a5f32658e9c60a05f6e3c7a652e752c Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 19 Apr 2022 10:01:59 -0400 Subject: [PATCH 72/73] Bump PHP to 8.0.18 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e0de310ace..1b38fc088a 100755 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ COPY public /usr/local/src/public RUN npm ci RUN npm run build -FROM php:8.0.17-cli-alpine3.15 as compile +FROM php:8.0.18-cli-alpine3.15 as compile ARG DEBUG=false ENV DEBUG=$DEBUG From 4277e4d22ba8e778f071c122e777341f74bdca95 Mon Sep 17 00:00:00 2001 From: Juan Calderon-Perez <835733+gaby@users.noreply.github.com> Date: Tue, 19 Apr 2022 10:10:16 -0400 Subject: [PATCH 73/73] Update PHP to 8.0.18 for final stage --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b38fc088a..c464885054 100755 --- a/Dockerfile +++ b/Dockerfile @@ -123,7 +123,7 @@ RUN \ ./configure && \ make && make install -FROM php:8.0.17-cli-alpine3.15 as final +FROM php:8.0.18-cli-alpine3.15 as final LABEL maintainer="team@appwrite.io"